Beispiel #1
0
        public static long CreateLunchArea(LunchAreaCreateModel model)
        {
            var l = new LunchArea()
            {
                Description = model.Description,
                Name = model.Name,
                Url = model.Url,
                LunchAreaStatus = LunchAreaStatus.New
            };

            using (var db = new DataContext())
            {
                db.LunchAreas.Add(l);
                db.SaveChanges();
            }
            return l.Id;
        }
Beispiel #2
0
 public JsonResult CreateLunchArea(LunchAreaCreateModel model)
 {
     model.Id = service.CreateLunchArea(model);
     return Json(model, JsonRequestBehavior.AllowGet);
 }
Beispiel #3
0
 public long CreateLunchArea(LunchAreaCreateModel model)
 {
     return AdminManager.CreateLunchArea(model);
 }