public void TestCreateInterestPointCategoryAsync()
        {
            BoraNowSeeder.Seed();
            var ipcipbo = new InterestPointCategoryInterestPointBusinessObject();
            var ipbo    = new InterestPointBusinessObject();
            var cipbo   = new CategoryInterestPointBusinessObject();
            var pbo     = new ProfileBusinessObject();

            var profile = new Profile("II", "AA");

            pbo.Create(profile);

            var c       = new CompanyBusinessObject();
            var company = new Company("A", "B", "12345678", "1234567", profile.Id);

            c.Create(company);

            var interestPoint         = new InterestPoint("a", "b", "c", "d", "e", "f", "g", true, true, company.Id);
            var category              = new CategoryInterestPoint("vegan");
            var interestPointCategory = new InterestPointCategoryInterestPoint(interestPoint.Id, category.Id);

            ipbo.Create(interestPoint);
            cipbo.Create(category);


            var resCreate = ipcipbo.CreateAsync(interestPointCategory).Result;
            var resGet    = ipcipbo.ReadAsync(interestPointCategory.Id).Result;

            Assert.IsTrue(resGet.Success && resCreate.Success && resGet.Result != null);
        }
        public async Task <IActionResult> Create([Bind("InterestPointId, CategoryId")] InterestPointCategoryInterestPointViewModel vm)
        {
            if (ModelState.IsValid)
            {
                var ipcip           = vm.ToInterestPointCategoryInteresPoint();
                var createOperation = await _bo.CreateAsync(ipcip);

                if (!createOperation.Success)
                {
                    return(OperationErrorBackToIndex(createOperation.Exception));
                }
                return(OperationSuccess("The record was successfuly created"));
            }
            return(View(vm));
        }