Esempio n. 1
0
 public static Light ToLight(this LightDO lightDO)
 {
     return(new Light {
         Description = lightDO.Description,
         Name = lightDO.Name,
         Photo = lightDO.Photo,
         SalePrice = lightDO.SalePrice,
         SoldPrice = lightDO.SoldPrice
     });
 }
 public ActionResult CreateLight(LightDO light = null)
 {
     if (light != null)
     {
         if (_adminService.CreateLight(light.ToLight()))
         {
             RedirectToAction("Light", "Home");
         }
     }
     return(View(light));
 }