Beispiel #1
0
 public static List <Share> GetShareList()
 {
     using (NavShareEntities db = new NavShareEntities())
     {
         return(db.Share.ToList());
     }
 }
Beispiel #2
0
 public static List <Nav> GetNavList()
 {
     using (NavShareEntities db = new NavShareEntities())
     {
         return(db.Nav.ToList());
     }
 }
Beispiel #3
0
 public static void InsertNav(Nav entity)
 {
     entity.VisitTime = DateTime.Now;
     using (NavShareEntities db = new NavShareEntities())
     {
         db.Nav.Add(entity);
         db.SaveChanges();
     }
 }
Beispiel #4
0
 public static void InsertShare(Share entity)
 {
     entity.ShareTime = DateTime.Now;
     using (NavShareEntities db = new NavShareEntities())
     {
         db.Share.Add(entity);
         db.SaveChanges();
     }
 }