public void Populate() { ////var svc = new KnockKnockMongo(); //var db = svc.Database<PotatoKnock>(); //db.DeleteMany(Builders<PotatoKnock>.Filter.Empty); var knock = new KnockDto { FeedId = Guid.NewGuid(), Id = Guid.NewGuid(), Location = new LocationDto { Latitude = 45, Longitude = 60 }, Message = "Turn me into a french fry?" }; using (var svc = new JsonServiceClient("http://localhost:40300/")) { var knockstr = knock.SerializeToString(); svc.Post(new KnockPost { Knock = knock }); } //svc.Any(new KnockPost {Knock = knock}); Console.WriteLine(knock.Id); }
public PotatoKnock(KnockDto other) { this.Id = other.Id; FeedId = other.FeedId; Content = other.Content; Message = other.Message; Location = other.Location.ToGeoJsonPoint(); }
public Potato(KnockDto other) { Id = other.Id; FeedId = other.FeedId; Content = other.Content; Message = other.Message; Location = other.Location; PotatoLoc = new GeoJsonPoint<GeoJson2DGeographicCoordinates>(new GeoJson2DGeographicCoordinates(other.Location.Longitude, other.Location.Latitude)); }
public void Populate() { var knock = new KnockDto() { FeedId = "potato", Id = new Random().Next(0, 100000), Location = new LocationDto { Latitude = 45, Longitude = 60 }, Message = "Turn me into a french fry?" }; //using (var svc = new JsonServiceClient("http://localhost:40300/")) //{ // svc.Post(new KnockPostV1() {KnockDto = knock}); //} var svc = new KnockKnockMongo(); svc.Any(new KnockPostV1 {Knock = knock}); Console.WriteLine(knock.Id); }