public IEnumerable <product> GetByNameOrId(String search) { long searchId = -1; try { searchId = Int64.Parse(search); } catch { } return(_repository.AsQueryble().Where(x => x.productName.Contains(search) || x.categoryId == searchId)); }
public IEnumerable <users_X_rols> GetAllByUserId(long id) { return(_repository.AsQueryble().Where(x => x.userId == id)); }
public user GetOneByEmployeeId(long employeeId) { return(_repository.AsQueryble().Where(x => x.employeeId == employeeId).FirstOrDefault()); }
public IEnumerable <employee> GetAll(Boolean isActive) { return(_repository.AsQueryble().Where(x => x.isActive == isActive)); }