[Authorize] public async Task <IHttpActionResult> Create(AutorPonenciaExt Obj) { try { log.Info(new MDCSet(this.ControllerContext.RouteData)); var result = await _repository.Create(Obj); return(Ok(result)); } catch (Exception e) { log.Error(new MDCSet(this.ControllerContext.RouteData), e); return(InternalServerError(e)); } }
public async Task <AutorPonenciaExt> Create(AutorPonenciaExt Obj) { try { var result = _ctx.AutorPonenciaExt.Add(Obj); await _ctx.SaveChangesAsync(); return(result); } catch (Exception e) { throw new Exception(e.Message, e); } }