Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public EditModel(AgileWorks.Infra.ApDbContext context)
 {
     _context = context;
 }
Esempio n. 3
0
 public DetailsModel(AgileWorks.Infra.ApDbContext context)
 {
     _context = context;
 }
Esempio n. 4
0
 public DeleteModel(AgileWorks.Infra.ApDbContext context)
 {
     _context = context;
 }