예제 #1
0
        public EntityCategory Get(int id)
        {
            var result = _categoryService.GetCategory(id);

            if (result == null)
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
            }
            return(result);
        }
예제 #2
0
 public void GetCategory()
 {
     mock.Setup(x => x.Categories);
     ServiceCategory service = new ServiceCategory(mock.Object);
     CategoryDTO     res     = service.GetCategory(null);
 }