public IActionResult UpdateUserEmailFrequency([FromBody] User UserInfo) { if (_context.Users.Any(u => u.Username == UserInfo.Username)) { _context.Users.FirstOrDefault(u => u.Username == UserInfo.Username).Frequency = UserInfo.Frequency; _context.SaveChanges(); return(Ok(UserInfo)); } return(BadRequest("No user found")); }
public TempZoneController(FlowbaseContext context) { _context = context; _context.SaveChanges(); }
public ChemicalsController(FlowbaseContext context) { _context = context; _context.SaveChanges(); }
public LocationController(FlowbaseContext context) { _context = context; _context.SaveChanges(); }
public UserController(FlowbaseContext context) { _context = context; _context.SaveChanges(); }