public IActionResult AddSeller(AddSellerCommand newSeller) { var repo = new SellerRepository(); newSeller.FirebaseUid = UserId; return(Ok(repo.AddSeller(newSeller))); }
public async Task <IHttpActionResult> AddSeller([FromBody] Seller newSeller) { SellerRepository _repo = new SellerRepository(); try { _repo.AddSeller(newSeller); return(StatusCode(HttpStatusCode.Created)); } catch (Exception ex) { return(StatusCode(HttpStatusCode.BadRequest)); } }