Esempio n. 1
0
 internal FoldersModel(Folders folders)
 {
     this.Id = folders.Id;
     this.ParentId = folders.ParentId;
     this.Title = folders.Title;
     this.IsList = folders.IsList;
 }
Esempio n. 2
0
        public ActionResult Add(int? parentId, string title, bool isList)
        {
            using (TreeContext context = new TreeContext())
            {
                var newFolders = new Folders()
                {
                    ParentId = parentId,
                    Title = title,
                    IsList=isList
                };
                context.Folders.Add(newFolders);
                context.SaveChanges();
            }

            return RedirectToAction("Index");
        }