Beispiel #1
0
        public async Task <ActionResult> AddCompany(Company company)
        {
            if (ModelState.IsValid)
            {
                Company result = await _companyManager.AddCompanyAsync(company);

                if (result != null)
                {
                    return(Ok(new ResponseModel {
                        Status = "ok", Message = "Company added successfully"
                    }));
                }
            }

            return(BadRequest(new ResponseModel {
                Status = "Failed", Message = "Model not valid"
            }));
        }