Exemplo n.º 1
0
 public void Remove(string _Name)
 {
     using (var context = new localsql())
     {
         Objective task = new Objective();
         foreach (var item in context.Set <Objective>().ToList())
         {
             if (item.Name.ToString() == _Name)
             {
                 context.Objectives.Attach(item);
                 context.Objectives.Remove(item);
                 context.SaveChanges();
             }
         }
     }
 }
Exemplo n.º 2
0
        public IEnumerable <Objective> GetGoals()
        {
            localsql context = new localsql();

            return(context.Set <Objective>().ToList());
        }