public HotelRoleDataObject GetRoleByName(string name) { HotelRole hotelRole = hotelRoleRepository.Find(Specification <HotelRole> .Eval(cr => cr.Name.Equals(name))); HotelRoleDataObject hotelRoleDataObject = AutoMapper.Mapper.Map <HotelRole, HotelRoleDataObject>(hotelRole); return(hotelRoleDataObject); }
public HotelRoleDataObject GetRoleByKey(Guid id) { HotelRole hotelRole = hotelRoleRepository.GetByKey(id); HotelRoleDataObject hotelRoleDataObject = AutoMapper.Mapper.Map <HotelRole, HotelRoleDataObject>(hotelRole); return(hotelRoleDataObject); }