public async Task <IActionResult> GetOrg(Guid guid) { IOrg org = await m_org_provider.GetOrg(guid); if (org == null) { return(NotFound()); } return(Ok(new OrgModel(org))); }
public async Task <IRetailOrder> CreateNewOrder(IUserAccount customer, Guid orgGuid) { RetailOrder order = new RetailOrder { Guid = Guid.NewGuid(), OrderedAt = DateTime.Now, Code = "C", Customer = new UserAccount(customer), Org = new Org(await m_org_provider.GetOrg(orgGuid)) }; return(await GenOrderNumber(order)); }