public IHttpActionResult InMenu(PublishBinding Model) { _PageService.InMenu(Model, User.Identity.GetUserId()); return Ok(); }
public void InMenu(PublishBinding Model, string UserID) { using (var _c = db) { var _P = _c.Pages.Where(m => m.PageID == Model.PageID).SingleOrDefault(); Can(_P.SiteID, UserID, _c); var _Page = _c.Pages.Where(m => m.PageID == Model.PageID).SingleOrDefault(); _Page.InMenu = Model.Published; _c.SaveChanges(); } }