Sqllite database migration capabilities are limited
1) Add the following model, do not perform database migration successfully, refer to this link "http://stackoverflow.com/questions/35797628/ef7-generates-wrong-migrations-with-sqlite"
Initial judgment is limited, so delete the database, delete the migrated files, rebuild the database "Http://www.atove.com/Article/Details/87E62DFDDBF9EC0C5350E7ACD43BADDF" (this article is non-. Net In the core environment, the experiment can not be successful, and later will be free to experiment)
Using system;using System.ComponentModel.DataAnnotations; Manual highlighting namespace mvcmovie.models{public class people{public int ID {get; set;} [Display (name = "name")] public string name {get; set;} [Display (Name = ' age ')] public int ages {get; set;}} }
2) Database OK
3) added controller PeopleController.cs, new view directory "People" and view file index.cshtml
public async task<iactionresult> Index () {return View (AW AIT _context. People.tolistasync ()); }
@model ienumerable<mvcmovie.models.people>@{viewdata["Title"] = "Index";} 4) Evolution of parameter verification methods in C #
[. NET Core 4] Test validation features (new as compared to Core tutorials)