コード例 #1
0
 //Makes a set with the current Cook Data from the Database
 public List <Cook> GetAll()
 {
     using (context = new CookContext())
     {
         return(context.CookComments.ToList());
     }
 }
コード例 #2
0
 public ActionResult Cooking(Cook cookModel)
 {
     using (CookContext context = new CookContext())
     {
         context.CookComments.Add(cookModel);
         context.SaveChanges();
     }
     return(View("Cooking", new Cook()));
 }