public ICollection <tblCars> FilterByColor(ICollection <tblCars> cars, tblColors color) { using (var db = new CSCbelgiumDatabaseEntities()) { return(cars.Where(a => a.tblColors.ColorName == color.ColorName).ToList()); } }
public void addColor(tblColors color) { using (var db = new CSCbelgiumDatabaseEntities()) { db.tblColors.Add(color); db.SaveChanges(); } }
public void deleteColor(int colorid) { using (var db = new CSCbelgiumDatabaseEntities()) { tblColors color = getColor(colorid); db.Entry(color).State = EntityState.Deleted; db.SaveChanges(); } }
public ICollection <tblCars> FilterByColor(ICollection <tblCars> cars, tblColors color) { return(dao.FilterByColor(cars, color)); }
public void addColor(tblColors color) { dao.addColor(color); }