Exemplo n.º 1
0
 public ContentTree DuplicateTree(ContentTree Model, string UserID)
 {
     using (var _c = db)
     {
         var _CPToDuplicate = _c.ContentProperties.Where(m => m.ContentPropertyID == Model.ContentPropertyID).SingleOrDefault();
         Can(_CPToDuplicate.SiteID, UserID, _c);
         int _CPID = Duplicate(Model.ContentPropertyID, _CPToDuplicate.ContentPropertyParentID, false);
         var _Model = new List<ContentProperty>();
         _Model.Add(_c.ContentProperties.Where(m => m.ContentPropertyID == _CPID).SingleOrDefault());
         return GetTreeOrder(_Model, _CPToDuplicate.ContentPropertyParentID, Model.CultureID, _c)[0];
     }
 }
Exemplo n.º 2
0
 public IHttpActionResult DuplicateTree(ContentTree Model)
 {
     return Ok(_ContentService.DuplicateTree(Model, User.Identity.GetUserId()));
 }