示例#1
0
 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());
     }
 }
示例#2
0
        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));
        }
示例#3
0
 public void Update(DailyStandUp dailyStandUp)
 {
     _unit.DailyStandUps.Update(dailyStandUp);
     _unit.Commit();
 }