Yes. I connect to SQL Server to read all tables, pick one to generate.
Here it goes:
{ "IsRegenerate": true, "MenuPosition": "main", "RelativeNamespace": "Bids", "EntityName": "Bid", "EntityNamePlural": "Bids", "TableName": "Bid", "PrimaryKeyType": "int", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": true, "UpdateDatabase": true, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": false, "CreateExcelImport": false, "IsNonModalCRUDPage": true, "IsMasterDetailPage": false, "GenerateOverridableEntity": false, "GenerateUnitTest": true, "GenerateUiTest": false, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "ID", "Type": "int", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "AppUserID", "Type": "int", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": true, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "AddressLine1", "Type": "string", "MaxLength": 50, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "AddressLine2", "Type": "string", "MaxLength": 25, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "City", "Type": "string", "MaxLength": 50, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "State", "Type": "string", "MaxLength": 25, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "Zip", "Type": "string", "MaxLength": 10, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "SearchRadius", "Type": "int", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "EventDateTime", "Type": "DateTime", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": true, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "BudgetLow", "Type": "int", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "BudgetHigh", "Type": "int", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "EventDescription", "Type": "string", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "CreatedDate", "Type": "DateTime", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "ModifiedDate", "Type": "DateTime", "MaxLength": -1, "MinLength": -1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": true, "Regex": "", "IsMultiLingual": false, "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} } ], "NavigationProperties": [], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [], "DbContext": null }
I get following error while generating entity through power tools.
Unable to create a 'DbContext' of type ''. The exception 'The entity type 'Bid' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
I am using SQL Server Express 2022. The table has a primary key.
Below is the DDL:
CREATE TABLE dbo.Bid( ID int IDENTITY(1,1) NOT NULL, AppUserID int NULL, EventDateTime datetime NULL, BudgetLow int NOT NULL, BudgetHigh int NOT NULL, EventDescription varchar(max) NOT NULL, CreatedDate datetime NOT NULL DEFAULT GETDATE(), ModifiedDate datetime NULL, CONSTRAINT PK_Bid_ID PRIMARY KEY CLUSTERED (ID), FOREIGN KEY (AppUserID) REFERENCES AppUser(ID) );
It doesn't generate proxy classes. Not sure if it is because of the above error and npm start throws compilation errors.
How do I unlock user from the database? I tried setting LockoutEndDateUtc to null but it didn't work.
I tried setting LockoutEndDateUtc to null but it still doen't work. Any idea how to unlock users from the backend?
If you query the entity before saving, concurrency is lost. Imagine where record is updated by one user while other user is making changes to the same record. When 2nd user clicks on Save, he is unware of the changed made by 1st user and overrides his changes.
Instead, what I expect to have happened is that 2nd user gets a concurrency exception that data has been modified after it was loaded in DOM.
Thanks for the reply but this adds an addition call back to the server to fetch the row before updating.
I use the following method to update the data from the Input received from the Angular UI.
public async Task CreateOrEdit(CreateOrEditOwnerDto input) { var owner = ObjectMapper.Map<Owner>(input); await _ownerRepository.UpdateAsync(owner); }
The above method updates all columns in the Owner table even if I only changed one column from the UI. This is very inefficient for a table with lots of columns.
How do I update only columns that have changed?
Never mind. I figured it out.
On the change log page it says the following.
"The change logs in this page are just a summary of major changes. Detailed release notes are shared on the Github repository (only available to the customers)."
Can you share exactly where this is kept? I tried to login and I couldn't see anything. I am a paid customer.