public virtual async Task <NegocioResult <T> > Create(T entity) { try { await Repository.Create(entity); return(NegocioResult <T> .Succeded()); }catch (Exception e) { return(new NegocioResult <T>(e)); } }
public virtual async Task <NegocioResult <T> > FindById(int entityId) { var entity = await Repository.FindById(entityId); return(NegocioResult <T> .Succeded(entity)); }
public virtual async Task <NegocioResult <IQueryable <T> > > FindAll() { var all = await Repository.FindAll(); return(NegocioResult <IQueryable <T> > .Succeded(all)); }