public async Task <IActionResult> CreateCulture([FromBody] Production.Culture value) { _db.Production_Culture.Add(value); await _db.SaveChangesAsync(); return(Ok(value)); }
public async Task <IActionResult> EditCulture(string cultureID, [FromBody] Production.Culture value) { var existing = await _db.Production_Culture.FirstOrDefaultAsync(x => x.CultureID == cultureID); if (existing == null) { return(NotFound()); } existing.CultureID = value.CultureID; existing.Name = value.Name; existing.ModifiedDate = value.ModifiedDate; _db.Production_Culture.Update(existing); await _db.SaveChangesAsync(); return(NoContent()); }