Example #1
0
 public int CreateLocation(LocationCreateViewModel viewModel)
 {
     return _locationDal.Create(new Location
     {
         PrimaryLocation = viewModel.PrimaryLocation,
         SecondaryLocation = viewModel.SecondaryLocation
     });
 }
        public ActionResult Create(LocationCreateViewModel model)
        {
            if (ModelState.IsValid)
            {
                _locationBll.CreateLocation(model);
                return RedirectToAction("Index");
            }

            return View(model);
        }