Exemplo n.º 1
0
        public JsonResult GetComputerRoles()
        {
            CatalogsService catalogsService = new CatalogsService();

            List <object> computerRolesList = catalogsService.GetComputerRoles().ToList();

            return(Json(new { computerRoles = computerRolesList }, JsonRequestBehavior.AllowGet));
        }
 public TestApiController()
 {
     controller   = new ApiController();
     _catalogs    = new CatalogsService();
     _products    = new ProductsSerice();
     _cRepo       = new CatalogRepo();
     _pRepo       = new ProductsRepo();
     _testCatalog = new Catalog {
         Name = "Тест"
     };
     _testProduct = new Product {
         Name = "Тест", CatalogId = 1, Price = 0, Quantity = 0
     };
 }
Exemplo n.º 3
0
        public JsonResult GetAdDomains()
        {
            CatalogsService catalogsService = new CatalogsService();

            return(Json(new { domains = catalogsService.GetAdDomains() }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
 public ApiController()
 {
     catalogs = new CatalogsService();
     products = new ProductsSerice();
 }