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);
        }
Esempio n. 2
0
 public PotatoKnock(KnockDto other)
 {
     this.Id  = other.Id;
     FeedId   = other.FeedId;
     Content  = other.Content;
     Message  = other.Message;
     Location = other.Location.ToGeoJsonPoint();
 }
Esempio n. 3
0
 public PotatoKnock(KnockDto other)
 {
     this._id = other.Id;
     FeedId   = other.FeedId;
     Content  = other.Content;
     Message  = other.Message;
     Location =
         new GeoJsonPoint <GeoJson2DGeographicCoordinates>(
             new GeoJson2DGeographicCoordinates(other.Location?.Longitude ?? 0.0, other.Location?.Latitude ?? 0.0));
 }