public static async Task <CatchmentIdentity> Add(this ICatchmentsRepository repository, string name, GeoJsonMultiPolygonJsonString geoJsonMultiPolygonJsonString) { var catchmentIdentity = CatchmentIdentity.New(); var catchment = new Catchment() { Identity = catchmentIdentity, Name = name, }; await repository.Add(geoJsonMultiPolygonJsonString, catchment); return(catchmentIdentity); }
public static async Task <CatchmentIdentity> Add(this ICatchmentsRepository repository, string name, IEnumerable <LngLat> vertices) { var catchmentIdentity = CatchmentIdentity.New(); var catchment = new Catchment() { Identity = catchmentIdentity, Name = name, }; catchment.Boundary.AddRange(vertices); await repository.Add(catchment); return(catchmentIdentity); }