public static void delete(int id) { DB sample = new DB(); SliderImage deleteitem = sample.SliderImages.Single(item => item.ID == id); sample.SliderImages.Remove(deleteitem); sample.SaveChanges(); }
public static void updateimage(SliderImage slider) { DB sample = new DB(); SliderImage oldimage = sample.SliderImages.Single(item => item.ID == slider.ID); oldimage.Title = slider.Title; oldimage.ImagePath = slider.ImagePath; oldimage.Status = slider.Status; sample.SaveChanges(); }
public static void insertcontact(contactu cmt) { DB person = new DB(); person.contactus.Add(cmt); person.SaveChanges(); }
public static void Addimages(SliderImage slider) { DB sample = new DB(); sample.SliderImages.Add(slider); sample.SaveChanges(); }