コード例 #1
0
        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());
        }
コード例 #2
0
 public Task UpdateDefinitionAsync(string id, TermDefinition value) => _grainFactory.GetGrain <IDictionaryEntryGrain>(id).UpdateDefinitionAsync(value);