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