public JsonResult AddLocation(Models.AjaxModels.NewLocationAjaxModel model) { Location location = new Location(); AutoMapper.Mapper.Map(model, location); locationService.AddLocation(location); return Json("ok", JsonRequestBehavior.AllowGet); }
public Location AddLocation(Location location) { locationRepository.Add(location); return location; }