public async Task <IActionResult> Post([FromBody] TermDefinition entry) { if (string.IsNullOrWhiteSpace(entry?.Simplified)) { return(BadRequest("Provided an invalid entry")); } var entryGrain = _grainFactory.GetGrain <IDictionaryEntryGrain>(entry.Simplified); await entryGrain.UpdateDefinitionAsync(entry); return(Ok()); }
public Task UpdateDefinitionAsync(string id, TermDefinition value) => _grainFactory.GetGrain <IDictionaryEntryGrain>(id).UpdateDefinitionAsync(value);