コード例 #1
0
        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));
            }
        }
コード例 #2
0
        public virtual async Task <NegocioResult <T> > FindById(int entityId)
        {
            var entity = await Repository.FindById(entityId);

            return(NegocioResult <T> .Succeded(entity));
        }
コード例 #3
0
        public virtual async Task <NegocioResult <IQueryable <T> > > FindAll()
        {
            var all = await Repository.FindAll();

            return(NegocioResult <IQueryable <T> > .Succeded(all));
        }