예제 #1
0
        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));
        }
예제 #2
0
 public async Task <IActionResult> Add([FromBody] NewOverrideCode model)
 {
     model.Description = $"Added by {User.Identity.Name}";
     return(Json(await _svc.Add(model)));
 }