예제 #1
0
 public Response <TEntity> GetById(int id)
 {
     return(ApplicationTry.Try(() =>
     {
         return serviceBase.GetById(id);
     }));
 }
예제 #2
0
 public Response <IEnumerable <TEntity> > GetAll()
 {
     return(ApplicationTry.Try(() =>
     {
         return serviceBase.GetAll();
     }));
 }
예제 #3
0
 public Response <bool> Delete(int id)
 {
     return(ApplicationTry.Try(() =>
     {
         serviceBase.Delete(id);
         return true;
     }));
 }
예제 #4
0
 public Response <TEntity> Create(TEntity entity)
 {
     return(ApplicationTry.Try(() =>
     {
         CreateWithService(entity);
         return entity;
     }));
 }
예제 #5
0
 public Response <bool> Update(TEntity entity)
 {
     return(ApplicationTry.Try(() =>
     {
         entity.ModifiedBy = "admin";
         serviceBase.Update(entity);
         return true;
     }));
 }
예제 #6
0
 Response <Employee> IGetEmployeeUseCase.GetById(int id)
 {
     return(ApplicationTry.Try(() =>
                               this.getEmployeeService.GetById(id)
                               ));
 }
예제 #7
0
 Response <IEnumerable <Employee> > IGetEmployeeUseCase.GetAll()
 {
     return(ApplicationTry.Try(() =>
                               this.getEmployeeService.GetAll()
                               ));
 }