예제 #1
0
 private void AddCropZones(FieldDto field)
 {
     for (int i = 0; i < DtoCount; i++)
     {
         var id       = _cropZoneId++;
         var cropZone = new CropZoneDto {
             Id = id, Name = $"CropZone {id}", FieldUid = field.Uid, CropYear = DateTime.Now.Year - i % DtoCount
         };
         CropZones.Add(cropZone);
     }
 }
예제 #2
0
 private void AddFieldBoundaries(FieldDto field)
 {
     for (int i = 0; i < DtoCount; i++)
     {
         var id          = _fieldBoundaryId++;
         var boundaryDto = new FieldBoundaryDto()
         {
             Id = id, FieldUid = field.Uid, CropYear = DateTime.Now.Year - i % DtoCount
         };
         FieldBoundaries.Add(boundaryDto);
     }
 }
예제 #3
0
 private void AddFields(FarmDto farm)
 {
     for (int i = 0; i < DtoCount; i++)
     {
         var field = new FieldDto {
             Uid = Guid.NewGuid(), Name = $"Field {i}", GrowerUid = farm.GrowerUid, FarmUid = farm.Uid
         };
         AddCropZones(field);
         AddFieldBoundaries(field);
         Fields.Add(field);
     }
 }