Ejemplo n.º 1
0
        public async Task <IActionResult> registerbussiness([FromBody] Bussiness bussiness)
        {
            try{ if (await _bussiness.BussinessExist(bussiness.Phonenumber))
                 {
                     return(BadRequest("Bussiness Already Exist"));
                 }

                 var BussinessCreated = await _bussiness.AddBussiness(bussiness);

                 return(StatusCode(201)); }
            catch
            {
                return(StatusCode(500, "computer says no"));
            }
        }