public void Edit (RollsRoyce rolls) { var original = this.Find(rolls.Id); original.Picture = rolls.Picture; original.Price = rolls.Price; original.GasMileage = rolls.GasMileage; original.BriefDescription = rolls.BriefDescription; original.FullDescription = rolls.FullDescription; original.Title = rolls.Title; _repo.SaveChanges(); }
public void Create (RollsRoyce rolls) { _repo.Add<RollsRoyce>(rolls); _repo.SaveChanges(); }