public async Task <IHttpActionResult> Post([FromBody] Product product) { var productExists = await _unitOfWork.Products.ProductExistsAsync(product); if (productExists) { return(new MyHelpers.ActionResultFactory.CreateActionResult <string>(Request, null, System.Net.HttpStatusCode.Conflict)); } else { _unitOfWork.Products.Add(product); await _unitOfWork.CompleteAsync(); return(new MyHelpers.ActionResultFactory.CreateActionResult <Product>(Request, product, System.Net.HttpStatusCode.OK)); } }