22
33namespace Initium . Services ;
44
5- public interface ICrudService < TEntity >
6- {
7- ServiceResult Create ( TEntity entity ) ;
8- IEnumerable < TEntity > FindAll ( ) ;
9- IEnumerable < TEntity > FindById ( Guid entityId ) ;
10- IEnumerable < TEntity > FindBy ( Func < TEntity , bool > predicate ) ;
11- ServiceResult Update ( Guid entityId , TEntity entity ) ;
12- ServiceResult Delete ( Guid entityId ) ;
13- ServiceResult DeleteBy ( Func < TEntity , bool > predicate ) ;
14- ServiceResult DeleteAll ( ) ;
15-
16- // BaseResult Create(TEntity entity);
17- // BaseResult Create(TCreateRequest createRequest);
18- // IQueryable<TEntity> Read();
19- // TEntity? Read(TPrimaryKeyType entityId);
20- // BaseResult Update(TPrimaryKeyType entityId, TEntity entity);
21- // BaseResult Delete(TPrimaryKeyType entityId);
22- // BaseResult Delete();
23- }
5+ // public interface ICrudService<TEntity>
6+ // {
7+ // ServiceResult Create(TEntity entity);
8+ // IEnumerable<TEntity> FindAll();
9+ // IEnumerable<TEntity> FindById(Guid entityId);
10+ // IEnumerable<TEntity> FindBy(Func<TEntity, bool> predicate);
11+ // ServiceResult Update(Guid entityId, TEntity entity);
12+ // ServiceResult Delete(Guid entityId);
13+ // ServiceResult DeleteBy(Func<TEntity, bool> predicate);
14+ // ServiceResult DeleteAll();
15+ //
16+ // // BaseResult Create(TEntity entity);
17+ // // BaseResult Create(TCreateRequest createRequest);
18+ // // IQueryable<TEntity> Read();
19+ // // TEntity? Read(TPrimaryKeyType entityId);
20+ // // BaseResult Update(TPrimaryKeyType entityId, TEntity entity);
21+ // // BaseResult Delete(TPrimaryKeyType entityId);
22+ // // BaseResult Delete();
23+ // }
0 commit comments