Beispiel #1
0
 public ActionResult Index()
 {
     using (DAO.adzadEntities adzadEntities = new DAO.adzadEntities())
     {
         var dsqqs = adzadEntities.pubs.ToList();
         int count = adzadEntities.pubs.Count();
     }
     return(View());
 }
Beispiel #2
0
        public void Add(pub newPub)
        {
            using (DAO.adzadEntities adzadEntities = new DAO.adzadEntities())
            {
                adzadEntities.pubs.Add(newPub);
                adzadEntities.SaveChanges();

                int count = adzadEntities.pubs.Count();
            }
        }