public async Task <OverrideCode> Add(NewOverrideCode model) { var entity = Mapper.Map <Data.OverrideCode>(model); entity.WhenCreated = DateTime.UtcNow; entity = await _store.Add(entity); return(Mapper.Map <OverrideCode>(entity)); }
public async Task <IActionResult> Add([FromBody] NewOverrideCode model) { model.Description = $"Added by {User.Identity.Name}"; return(Json(await _svc.Add(model))); }