public List <MechanicViewModel> LoadMechanic()
        {
            List <Mechanic>          result       = _mechanicRepository.GetMany(m => m.Status == (int)DbConstant.DefaultDataStatus.Active).ToList();
            List <MechanicViewModel> mappedResult = new List <MechanicViewModel>();

            return(Map(result, mappedResult));
        }
Beispiel #2
0
        public List <MechanicViewModel> SearchMechanic(string mechanicName)
        {
            List <Mechanic>          result       = _mechanicRepository.GetMany(c => c.Name.Contains(mechanicName) && c.Status == (int)DbConstant.DefaultDataStatus.Active).OrderBy(c => c.Name).ToList();
            List <MechanicViewModel> mappedResult = new List <MechanicViewModel>();

            return(Map(result, mappedResult));
        }