1
내가하고 싶은 일은 SelectList
을 범주 리포지토리의 범주로 채 웁니다. 약간의 실물 모형 http://mockupbuilder.com/App/15379.어떻게 범주 목록으로 선택 목록 채우기
public class Category : AbstractEntity<Category> {
public String Title { get; set; }
public String Description { get; set; }
}
가 어떻게이 SelectList
를 채울 않습니다
[HandleError]
public class ProductController : Controller {
private IRepository<Product> exhibitions;
private IRepository<Category> categories;
private readonly Int32 PageSize = 18;
// ctor ...
[HttpPost]
public ActionResult Create(Product product, Guid categoryId) {
// validation ...
// properties setting ...
product.Category = categories.Get(categoryId);
return View(product);
}
Category 클래스는 다음과 같이이다 :
는 내가 지금 가지고있는 것은 컨트롤러입니다? JSON
을 사용하여 어떻게 만들 수 있습니까?
감사합니다.