public Response <TEntity> GetById(int id) { return(ApplicationTry.Try(() => { return serviceBase.GetById(id); })); }
public Response <IEnumerable <TEntity> > GetAll() { return(ApplicationTry.Try(() => { return serviceBase.GetAll(); })); }
public Response <bool> Delete(int id) { return(ApplicationTry.Try(() => { serviceBase.Delete(id); return true; })); }
public Response <TEntity> Create(TEntity entity) { return(ApplicationTry.Try(() => { CreateWithService(entity); return entity; })); }
public Response <bool> Update(TEntity entity) { return(ApplicationTry.Try(() => { entity.ModifiedBy = "admin"; serviceBase.Update(entity); return true; })); }
Response <Employee> IGetEmployeeUseCase.GetById(int id) { return(ApplicationTry.Try(() => this.getEmployeeService.GetById(id) )); }
Response <IEnumerable <Employee> > IGetEmployeeUseCase.GetAll() { return(ApplicationTry.Try(() => this.getEmployeeService.GetAll() )); }