Пример #1
0
        public CustomerRoleDataObject GetRoleByName(string name)
        {
            CustomerRole           customerRole           = customerRoleRepository.Find(Specification <CustomerRole> .Eval(cr => cr.Name.Equals(name)));
            CustomerRoleDataObject customerRoleDataObject = AutoMapper.Mapper.Map <CustomerRole, CustomerRoleDataObject>(customerRole);

            return(customerRoleDataObject);
        }
Пример #2
0
 public async Task <IEnumerable <CustomerRole> > GetRolesOfCustomer(int id)
 {
     return(await customerRoleRepository.Find(id));
 }