public static SimpleList.DataModel.Models.SimpleList Clone(this SimpleList.DataModel.Models.SimpleList simpleListToClone, int userId, bool includeDoneSimpleListItems, string clonedListName)
        {
            var clonedSimpleList = new SimpleList.DataModel.Models.SimpleList
            {
                Name            = clonedListName,
                DateAdded       = DateTime.Now,
                AllDone         = false,
                UserID          = simpleListToClone.UserID,
                SimpleListItems = new List <SimpleList.DataModel.Models.SimpleListItem>()
            };

            foreach (var item in simpleListToClone.SimpleListItems)
            {
                if (!includeDoneSimpleListItems && item.Done)
                {
                    continue;
                }
                else
                {
                    clonedSimpleList.SimpleListItems.Add(item.Clone(userId));
                }
            }

            return(clonedSimpleList);
        }
 public int AddSimpleList(SimpleList.DataModel.Models.SimpleList simpleList)
 {
     _simpleListEntities.SimpleLists.Add(simpleList);
     return(_simpleListEntities.SaveChanges());
 }