コード例 #1
0
 public CarMakeDTO MapToCarMakeDTO(CarMake carMake)
 {
     return(new CarMakeDTO
     {
         id = carMake.id,
         Make = carMake.Make
     });
 }
コード例 #2
0
 public CarMakeDTO Get(int id)
 {
     using (CarRentalEntities context = new CarRentalEntities())
     {
         CarMake carMake = context.usp_CarMake_Get_Id(id).FirstOrDefault();
         return(carMakeMapping.MapToCarMakeDTO(carMake));
     }
 }