예제 #1
0
 public static void delete(int id)
 {
     using (publishEntities context = new publishEntities())
     {
         publish obj = context.publishes.First(x => x.Id == id);
         context.publishes.Remove(obj);
         context.SaveChanges();
     }
 }
예제 #2
0
 public static void EditUpdate(int id, String place, String date1, String publisher)
 {
     using (publishEntities context = new publishEntities())
     {
         publish obj = context.publishes.First(x => x.Id == id);
         obj.publication_place = place;
         obj.publication_date  = date1;
         obj.publisher         = publisher;
         context.SaveChanges();
     }
 }
예제 #3
0
        public static void registernew(String uname, String upass)
        {
            using (publishEntities context = new publishEntities())
            {
                register obj = new register();
                obj.username = uname;
                obj.password = upass;


                context.registers.Add(obj);

                context.SaveChanges();
            }
        }