示例#1
0
 public IActionResult Post([FromBody] GlucoseLevelStatistics value)
 {
     if (_user == null)
     {
         _user = _userRepository.Get(User.Identity.GetUserId());
     }
     value.ApplicationUser = _user;
     _glucoseRepository.Add(value);
     return(Ok(value));
 }
示例#2
0
 public void Add(GlucoseLevelStatistics statistics)
 {
     Context.GlucoseLevels.Add(statistics);
     Context.SaveChanges();
 }