public UserProcessesController(BlinqContext context) { _context = context; //Artyom, this will cause exception. I guess because if dbSet is empty it does not guarantee your //InMemoryDatabase does not have the records. But the Id has to be unique. And it throws exception. if (_context.UserProcess.Any()) { return; } _context.UserProcess.Add(new UserProcess { Id = 1, Name = "YoTube", WastedTime = 50 }); _context.UserProcess.Add(new UserProcess { Id = 2, Name = "Facebuk", WastedTime = 40 }); _context.UserProcess.Add(new UserProcess { Id = 3, Name = "Other", WastedTime = 10 }); _context.SaveChanges(); }
public MonitoringDataController(BlinqContext context, IHostingEnvironment env) { _context = context; _env = env; }
public AccountController(BlinqContext context, UserManager <AppUser> userManager, IEmailSender emailSender) { _context = context; _userManager = userManager; _emailSender = emailSender; }
public ReservationController(BlinqContext context) { _context = context; }