Exemple #1
0
        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));
        }
Exemple #2
0
 public IEnumerable <users_X_rols> GetAllByUserId(long id)
 {
     return(_repository.AsQueryble().Where(x => x.userId == id));
 }
Exemple #3
0
 public user GetOneByEmployeeId(long employeeId)
 {
     return(_repository.AsQueryble().Where(x => x.employeeId == employeeId).FirstOrDefault());
 }
Exemple #4
0
 public IEnumerable <employee> GetAll(Boolean isActive)
 {
     return(_repository.AsQueryble().Where(x => x.isActive == isActive));
 }