Exemplo n.º 1
0
        public ActionResult NewType(String[] attributes, ProductType productType)
        {
            var attributeDefs = schemaService.GetAttributes(attributes);
            productType.Attributes.AddRange(attributeDefs);
            schemaService.SaveProductType(productType);
            var productTypes = schemaService.GetProductTypes();

            return PartialView("Types/Index", productTypes);
        }
Exemplo n.º 2
0
 public void SaveProductType(ProductType productType)
 {
     mongoService
         .GetCollection<ProductType>("types")
         .Save(productType);
 }
Exemplo n.º 3
0
 public ActionResult NewType()
 {
     var type = new ProductType();
     var attributes = schemaService.GetAttributes();
     var model = new NewProductTypeModel() { ProductType = type, Attributes = attributes };
     return PartialView("Types/Edit", model);
 }