public ActionResult <CategoryInterestPointViewModel> Get(Guid id) { var res = _bo.Read(id); if (res.Success) { if (res.Result == null) { return(NotFound()); } var cvm = CategoryInterestPointViewModel.Parse(res.Result); return(cvm); } else { return(new ObjectResult(HttpStatusCode.InternalServerError)); } }
public void TestCreateCategoryInterestPoint() { BoraNowSeeder.Seed(); var cipbo = new CategoryInterestPointBusinessObject(); var categoryInterestPoint = new CategoryInterestPoint("B"); var resCreate = cipbo.Create(categoryInterestPoint); var resGet = cipbo.Read(categoryInterestPoint.Id); Assert.IsTrue(resGet.Success && resCreate.Success && resGet.Result != null); }