public static void Initialize(IServiceProvider serviceProvider) { using (var context = new OT2Context( serviceProvider.GetRequiredService < DbContextOptions <OT2Context> >())) { // Look for any movies. if (context.Emp.Any()) { return; // DB has been seeded } context.Emp.AddRange( new Emp { FirstName = "sss", LastName = "sss", Gender = "ss", Birthday = "sss", Email = "sss", Line = "sss", Call = "sss", Addr = "sss", Image = "sss", Date = DateTime.Parse("1989-2-12"), Status = "ss", CompanyName = "ss", DepartmentName = "ss", LocationName = "sss", EmployeeTypeID = "ss", PositionID = "ssss" } ); context.SaveChanges(); } }
public DeleteModel(OT2.Models.OT2Context context) { _context = context; }
public IndexModel(OT2.Models.OT2Context context) { _context = context; }
public EditModel(OT2.Models.OT2Context context) { _context = context; }
public DetailsModel(OT2.Models.OT2Context context) { _context = context; }
public CreateModel(OT2.Models.OT2Context context) { _context = context; }