public async Task <EstimationProject> Update(EstimationProject entity) { _repoContext.Estimations.Update(entity); var result = _repoContext.SaveChanges(); var estimation = await _repoContext.Estimations.FindAsync(entity.Id); return(estimation); }
public IActionResult Put(int id, [FromBody] EstimationProject value) { if (value == null) { return(BadRequest()); } _repoWrapper.Update(value); return(CreatedAtRoute("GetEstimation", new { Id = value.Id }, value)); }
public void Delete(EstimationProject entity) { _repoContext.Estimations.Remove(entity); _repoContext.SaveChanges(); }
public void Create(EstimationProject entity) { _repoContext.Estimations.Add(entity); //_repoContext.SaveChanges(); }