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);
コード例 #6
0
 partial void DeleteBuilders(Builders instance);
コード例 #7
0
 partial void UpdateBuilders(Builders instance);
コード例 #8
0
 partial void InsertBuilders(Builders instance);