예제 #1
0
 public void Add(RepresentationAdd category)
 {
     _representations.Add(new Representation {
         Title       = category.Title,
         Description = category.Description,
         Telephone   = category.Telephone,
         Latitude    = category.Latitude,
         Longitude   = category.Longitude
     });
 }
        // Post: Admin/Category/Add/id
        public virtual ActionResult Add(RepresentationAdd model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            _representationService.Add(model);
            _uow.SaveAllChanges();
            return(RedirectToAction("Index"));
        }
        // GET: Admin/Category/Add
        public virtual ActionResult Add()
        {
            RepresentationAdd model = new RepresentationAdd();

            return(View(model));
        }