예제 #1
0
 public virtual HttpResponseMessage ProductCreate(KeywordDto model)
 {
     if (!ModelState.IsValid)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest));
     }
     unitOfWork.Do(work =>
     {
         var entity  = new Keyword();
         entity.Name = model.Name;
         keywordRepository.Add(entity);
     });
     return(Request.CreateResponse(HttpStatusCode.OK));
 }