gowebUSA / MSSA-Project

MSSASD7 repository for projects in C# and T-SQL
1 stars 0 forks source link

#4 Create SeedData.cs #21

Closed gowebUSA closed 4 years ago

gowebUSA commented 4 years ago

Pri 4

At first, as a developer, I did not want to create a SeedData. But as the project evolves and become more dynamic and data grows, I want to have a SeedData to save time on re=typing all sample data.

Accepted Criteria: When SeedData.cs is working properly.

gowebUSA commented 4 years ago

Created SeedData.cs on Models folder. Used OmafContext as new Object. Also modified Program.cs to add object "host" (Line 19 - 36).

gowebUSA commented 4 years ago

SeedData works after every Add-Migrate. Also added [Required] on Aircraft.cs for NOT NULL values. Tested and works. Able to do the following: