public void Update(Userr product) { using (CloudModel context = new CloudModel()) { context.Entry(product).State = EntityState.Modified; } }
public void Create(Userr userr) { using (CloudModel context = new CloudModel()) { context.Userr.Add(userr); context.SaveChanges(); } }
public void Create(FileBase userr) { using (CloudModel context = new CloudModel()) { context.FileBase.Add(userr); context.SaveChanges(); } }
public List <Userr> SelectAll() { List <Userr> cat; using (CloudModel context = new CloudModel()) { cat = context.Userr.ToList(); } return(cat); }
public List <FileBase> SelectAll() { List <FileBase> cat; using (CloudModel context = new CloudModel()) { cat = context.FileBase.ToList(); } return(cat); }
public void Delete(int id) { Userr result = new Userr(); using (CloudModel context = new CloudModel()) { List <Userr> temp = context.Userr.ToList(); for (int i = 0; i < temp.Count; i++) { if (temp[i].Id == id) { context.Userr.Remove(temp[i]); } } context.SaveChanges(); } }
public Userr Select(int id) { Userr result = new Userr(); using (CloudModel context = new CloudModel()) { List <Userr> temp = context.Userr.ToList(); for (int i = 0; i < temp.Count; i++) { if (temp[i].Id == id) { result = temp[i]; } } } return(result); }
public void Delete(int id) { FileBase result = new FileBase(); using (CloudModel context = new CloudModel()) { List <FileBase> temp = context.FileBase.ToList(); for (int i = 0; i < temp.Count; i++) { if (temp[i].Id == id) { context.FileBase.Remove(temp[i]); } } context.SaveChanges(); } }
public FileBase Select(int id) { FileBase result = new FileBase(); using (CloudModel context = new CloudModel()) { List <FileBase> temp = context.FileBase.ToList(); for (int i = 0; i < temp.Count; i++) { if (temp[i].Id == id) { result = temp[i]; } } } return(result); }