public async Task SetOwner(ICustomerGrain customer) { if (customer == null) { throw new ArgumentNullException("customer"); } State.Owner = customer; await WriteStateAsync(); }
public async Task AddCustomer(ICustomerGrain newCustomer) { if (State.AllCustomerGrains.Any(e => e.GetGrainIdentity() == newCustomer.GetGrainIdentity() )) { return; } State.AllCustomerGrains.Add(newCustomer); await WriteStateAsync(); return; }