Ejemplo n.º 1
0
 public List <CarDTO> List()
 {
     using (CarRentalEntities context = new CarRentalEntities())
     {
         var cars = context.usp_Car_List().ToList();
         return(carMapping.MapToListCarDTO(cars));
     }
 }
Ejemplo n.º 2
0
 public UserDTO MapToUserDTO(User user)
 {
     return(new UserDTO
     {
         Car = carMapping.MapToListCarDTO(user.Car.ToList()),
         Company = user.Company,
         Job = user.Job,
         Email = user.Email,
         Firstname = user.Firstname,
         Id = user.Id,
         Is_Active = user.is_Active,
         Is_Address_Private = user.is_Address_Private,
         Lastname = user.Lastname,
         Note = user.Note,
         Password = user.Password,
         Phone_Number = user.Phone_Number,
         Role = user.Role,
         UserBooking = user.UserBooking,
         user_address = user.user_address
     });
 }