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