public static void Initialize(ApDbContext context) { if (context.Tasks.Any()) { return; } var tasks = new TaskData[] { new TaskData { Id = Guid.NewGuid().ToString(), Name = "Schoolwork", Description = "", ValidFrom = DateTime.Now, ValidTo = new DateTime(2020, 05, 29, 13, 00, 00), Completed = false }, new TaskData { Id = Guid.NewGuid().ToString(), Name = "Gym", Description = "", ValidFrom = DateTime.Now, ValidTo = new DateTime(2020, 05, 29, 01, 00, 00), Completed = false }, new TaskData { Id = Guid.NewGuid().ToString(), Name = "Read", Description = "", ValidFrom = DateTime.Now, ValidTo = new DateTime(2020, 05, 30, 6, 00, 00), Completed = false }, }; context.Tasks.AddRange(tasks); context.SaveChanges(); }
public EditModel(AgileWorks.Infra.ApDbContext context) { _context = context; }
public DetailsModel(AgileWorks.Infra.ApDbContext context) { _context = context; }
public DeleteModel(AgileWorks.Infra.ApDbContext context) { _context = context; }