예제 #1
0
        public Task <T> Update(T entity)
        {
            ValidarEntidadNula <T> .IsNullEntity(entity);

            _entities.Attach(entity);
            _entities.Update(entity);
            return(Task.FromResult(entity));
        }
예제 #2
0
        public Task <bool> DeleteAsync(T entity)
        {
            ValidarEntidadNula <T> .IsNullEntity(entity);

            _entities.Attach(entity);
            _entities.Remove(entity);
            return(Task.FromResult(true));
        }
예제 #3
0
        public async Task <T> AddAsync(T entity)
        {
            ValidarEntidadNula <T> .IsNullEntity(entity);

            await _entities.AddAsync(entity).ConfigureAwait(false);

            return(entity);
        }