public void MusteriGuncelDoldur() { ArabaContext cc = new ArabaContext(); var result = cc.Musteriler.Where(x => x.Username == label21.Text); dataGridmusteriprofil.DataSource = result.ToList(); }
public bool Guncelle(Adminmodel p, int AdmId) { try { ArabaContext ctx = new ArabaContext(); Adminmodel adm = ctx.admins.Find(AdmId); if (adm != null) { int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(true); } else { return(false); } } else { return(false); } } catch (Exception) { throw; } }
public virtual int Update() { try { dbContext = dbContext ?? new ArabaContext(); return(dbContext.SaveChanges()); } catch (Exception ex) { throw ex; } }
public virtual int Delete(T entity) { try { dbContext = dbContext ?? new ArabaContext(); dbContext.Set <T>().Remove(entity); return(dbContext.SaveChanges()); } catch (Exception ex) { throw ex; } }
public bool Sil(Adminmodel adm) { try { ArabaContext ctx = new ArabaContext(); ctx.admins.Remove(adm); return(ctx.SaveChanges() > 0); } catch (Exception) { throw; } }
public bool AdminEkle(Adminmodel prs) { try { ArabaContext ctx = new ArabaContext(); ctx.admins.Add(prs); return(ctx.SaveChanges() > 0); } catch (Exception) { throw; } }
public List <Adminmodel> Listele() { try { ArabaContext ctx = new ArabaContext(); List <Adminmodel> lst = ctx.admins.ToList(); if (lst != null) { return(lst); } else { return(null); } } catch (Exception) { throw; } }
public T GetByID(ID id) { dbContext = new ArabaContext(); return(dbContext.Set <T>().Find(id)); }
public List <T> GetAll() { dbContext = new ArabaContext(); return(dbContext.Set <T>().ToList()); }
public AdminRepository() { _ac = new ArabaContext(); }
public MarkaRepository() { _ac = new ArabaContext(); }
public MusteriRepository() { _ac = new ArabaContext(); }
public ModelRepository() { _ac = new ArabaContext(); }