예제 #1
0
 public string GetAllCategory()
 {
     ICategorieRepository category = new CategorieRepository();
     var result = category.GetAll();
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
예제 #2
0
        public HttpResponseMessage PostCategoryCreate(
           [FromBody] Categorie categorie
            )
        {
            ICategorieRepository cat = new CategorieRepository();
            var result = cat.Add(categorie.Name);

            return Request.CreateResponse(HttpStatusCode.OK, result);
        }