Base solution for your next web application
Open Closed

New Entity Creation Bug 12.4.0 #11751


User avatar
0
[email protected] created

I'm using AspNetZero 12.4.0, I've also tried this with the latest release and I get the same results. When I create an entity "GrowthRates" in the GrowthRatesController there are two errors. The first is with var hasFileProp = True;, this should be var hasFileProp = true;. The second is with var projectType = Angular;, this looks like it should be a string or enum and it is not. and therefore must be manually changed.


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Just to confirm, this happens when you genrate a new entity using Power Tools, is that right ? If so, could you share generated entity json file ?

    Thanks,

  • User Avatar
    0
    [email protected] created

    Hi,

    Just to confirm, this happens when you genrate a new entity using Power Tools, is that right ? If so, could you share generated entity json file ?

    Thanks,

    This is in the controller that is built after creating the entity using Power Tools.

  • User Avatar
    0
    [email protected] created

    Here is the contents of the JSON file. { "IsRegenerate": false, "MenuPosition": "main", "RelativeNamespace": "Swine", "EntityName": "PigGrowthRate", "EntityNamePlural": "PigGrowthRates", "TableName": "PigGrowthRates", "PrimaryKeyType": "int", "BaseClass": "Entity", "EntityHistory": true, "AutoMigration": true, "UpdateDatabase": true, "CreateUserInterface": true, "CreateViewOnly": false, "CreateExcelExport": true, "IsNonModalCRUDPage": false, "IsMasterDetailPage": false, "GenerateOverridableEntity": false, "GenerateUnitTest": true, "GenerateUiTest": true, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Photo", "Type": "file", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": true, "Regex": "", "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "DateOfAssessment", "Type": "DateTime", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} }, { "Name": "Weight", "Type": "double", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": { "Precision": "2" } }, { "Name": "Length", "Type": "double", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": { "Precision": "2" } }, { "Name": "Girth", "Type": "double", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": { "Precision": "2" } }, { "Name": "MarketScore", "Type": "int", "MaxLength": 0, "MinLength": 0, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": false, "Nullable": true, "Regex": "", "UserInterface": { "AdvancedFilter": false, "List": true, "CreateOrUpdate": true }, "ViewType": null, "AdditionalData": {} } ], "NavigationProperties": [], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [], "DbContext": null }

  • User Avatar
    0
    [email protected] created

    There also appears to be a bug with templating as noted in the attached image. The variable dateRange is being used before its declaration.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @[email protected],

    We will update the host controller template in the next version. But I think the angular problem is related to lint. Could you mouse hover on the error and send us a screenshot?