public ActionResult AddBuilder(AddBuilder builder) { BuilderRepository repository = new BuilderRepository(); Builders builderToAdd = new Builders { name = builder.builderName }; repository.Save(builderToAdd); return RedirectToAction("Index"); }
public ActionResult Edit(int builderId, EditBuilder builder) { BuilderRepository repository = new BuilderRepository(); Builders builderToUpdate = new Builders { id = builder.builderId, Contracts = repository.GetById(builderId).Contracts, name = builder.builderName }; repository.Update(builderToUpdate); return RedirectToAction("Index"); }
partial void DeleteBuilders(Builders instance);
partial void UpdateBuilders(Builders instance);
partial void InsertBuilders(Builders instance);