public bool Create(string domain, string title, string adminEmail) { var cid = Guid.NewGuid(); return(companyRepo.Create(new Company { Id = cid, Domain = domain, Title = title }, new User { CompanyId = cid, Email = adminEmail })); }
public async Task <Company> Add(Company newCompany) { if (newCompany == null) { throw new Exception("Valor não pode ser nulo para empresa"); } await _repo.Create(newCompany); return(newCompany); }
public IActionResult Create([FromBody] Company newCompany) { return(StatusCode(StatusCodes.Status200OK, repo.Create(newCompany))); }