示例#1
0
        private async Task CreateFarmAsync(FarmData farmData)
        {
            // Require a minimum of a name
            if (string.IsNullOrWhiteSpace(farmData.Name))
            {
                return;
            }

            Logger.LogInformation($"Creating farm \"{farmData.Name}\"");

            var dbFarm = await FarmDataToFarmService.MakeFarmFromFarmDataAsync(farmData);

            await FarmRepository.CreateAsync(dbFarm);
        }