-
Notifications
You must be signed in to change notification settings - Fork 0
022 Second View (Enterprise)
chempkovsky edited this page May 24, 2022
·
1 revision
- First page of the Wizard
- Second page of the Wizard
- Third page of the Wizard
- Fourth page of the Wizard
- Fifth page of the Wizard
- Sixth page of the Wizard
- Seventh page of the Wizard
- Eighth page of the Wizard
- Ninth page of the Wizard
read the following article as reminder
repeat the steps described in the article
repeat the steps described in the article
repeat the steps described in the article
- On the third page of the Wizard we select Entity for the View. Choose
PhBkEntity.csproj
andPhbkEnterprise
-class and clickNext
-button
Click to show the picture
repeat the steps described in the article
- On the fifth page of the Wizard we define subset of properties, we turn on
Jenerate JsonProperty Attribute
-CheckBox, weTitle
andPlural Title
for the given view. ClickNext
-button.
Click to show the picture
repeat the steps described in the article
repeat the steps described in the article
The PhbkEnterpriseView.cs
will be created in the PhBk
-folder of the PhBkViews.csproj
-project
Click to show the code
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Expressions;
namespace PhBkViews.PhBk {
public class PhbkEnterpriseView {
// [JsonProperty(PropertyName = "entrprsId")]
[JsonPropertyName("entrprsId")]
[Required]
[Display(Description="Row id",Name="Id of the Enterprise",Prompt="Enter Enterprise Id",ShortName="Enterprise Id")]
public System.Int32 EntrprsId { get; set; }
// [JsonProperty(PropertyName = "entrprsName")]
[JsonPropertyName("entrprsName")]
[Required]
[Display(Description="Name of the Enterprise",Name="Name of the Enterprise",Prompt="Enter Enterprise Name",ShortName="Enterprise Name")]
[StringLength(20,MinimumLength=3,ErrorMessage="Invalid")]
public System.String EntrprsName { get; set; } = null!;
// [JsonProperty(PropertyName = "entrprsDesc")]
[JsonPropertyName("entrprsDesc")]
[Display(Description="Description of the Enterprise",Name="Description of the Enterprise",Prompt="Description Enterprise Name",ShortName="Enterprise Description")]
[StringLength(250,ErrorMessage="Invalid")]
public System.String ? EntrprsDesc { get; set; }
}
}
repeat the steps described in the article
repeat the steps described in the article
The PhbkEnterpriseViewPage.cs
will be created in the PhBk
-folder of the PhBkViews.csproj
-project
Click to show the code
//using System;
//using System.Collections.Generic;
//using System.ComponentModel.DataAnnotations;
//using System.Linq;
//using System.Linq.Expressions;
// using Newtonsoft.Json;
// using Newtonsoft.Json.Serialization;
namespace PhBkViews.PhBk {
public class PhbkEnterpriseViewPage {
public int page { get; set; }
public int pagesize { get; set; }
public int pagecount { get; set; }
public int total { get; set; }
public List<PhbkEnterpriseView> items { get; set; } = null!;
}
}
- After
Save
-operation in the solution folder the Wizard's repo file will be created(or updated). - A separate repo file is created for each DbContext.
- The repo file is updated only when you click the save button.