public Student(Storage.Student student, int count) { FileNumber = student.FileNumber; FirstName = student.FirstName; LastName = student.LastName; ListNumber = student.ListNumber; Status = new List <MatrixItem>(); for (int n = 1; n <= count; n++) { Status.Add(new MatrixItem(student.Exercise(n))); } }
/// <summary> /// Начальное заполнение базы данных /// </summary> /// <param name="context"></param> protected override void Seed(MvpApp.Storage.Database db) { // Если нет ни одного студента if (db.Students.Count() == 0) { var g = new Storage.Group() { Number = 1 }; db.Groups.Add(g); var s = new Storage.Student() { Name = "Иван", FamilyName = "Иванов", Group = g }; db.Students.Add(s); db.SaveChanges(); } }