コード例 #1
0
 public ActionResult Create(CreateItemViewModel viewModel, CreateItemModel model)
 {
     model.AddItem(viewModel);
     return RedirectToAction("Index");
 }
コード例 #2
0
 public void AddItem(CreateItemViewModel viewModel)
 {
     _itemService.Add(new ItemDto{Name=viewModel.Name, Description = viewModel.Description});
 }