public IActionResult CreateStandUp([FromBody] DailyStandUp dailyStandUp) { try { dailyStandUp.Сonducted = DateTime.Now; dailyStandUpManager.Create(dailyStandUp); return(Ok(dailyStandUp)); } catch (Exception e) { Logger.Logger.LogError("Creating failed.", e); return(BadRequest()); } }
public IActionResult Patch([FromODataUri] int key, Delta <DailyStandUp> updateDailyStandUpRequestModel) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } DailyStandUp dailyStandUp = dailyStandUpManager.GetById(key); if (dailyStandUp == null) { return(NotFound()); } updateDailyStandUpRequestModel.Patch(dailyStandUp); dailyStandUpManager.Update(dailyStandUp); return(Updated(dailyStandUp)); }
public void Update(DailyStandUp dailyStandUp) { _unit.DailyStandUps.Update(dailyStandUp); _unit.Commit(); }