示例#1
0
        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"));
        }
示例#2
0
 public TempZoneController(FlowbaseContext context)
 {
     _context = context;
     _context.SaveChanges();
 }
示例#3
0
 public ChemicalsController(FlowbaseContext context)
 {
     _context = context;
     _context.SaveChanges();
 }
 public LocationController(FlowbaseContext context)
 {
     _context = context;
     _context.SaveChanges();
 }
示例#5
0
 public UserController(FlowbaseContext context)
 {
     _context = context;
     _context.SaveChanges();
 }