Пример #1
0
 public static List <Categories> SelectCategory()
 {
     using (DBSchedule context = new DBSchedule())
     {
         return(context.Categories.ToList());
     }
 }
Пример #2
0
 public static List <Notes> SelectNotes()
 {
     using (DBSchedule context = new DBSchedule())
     {
         return(context.Notes.Include(n => n.Categories).ToList());
     }
 }
Пример #3
0
 public static int InsertNote(Categories category)
 {
     using (DBSchedule context = new DBSchedule())
     {
         context.Categories.Add(category);
         return(context.SaveChanges());
     }
 }