Example #1
0
        public async Task <JsonResult> Get()
        {
            var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017");
            var tumtahminler   = mongodbservice.GetAllTahmin();

            return(Json(tumtahminler));
        }
Example #2
0
 public async Task Put(string id, [FromBody] ForcastModel value)
 {
     var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017");
     await mongodbservice.UpdateTahmin(new ObjectId(id), value);
 }
Example #3
0
        public void Delete(string id)
        {
            var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017");

            mongodbservice.DeleteTahmin(new ObjectId(id));
        }
Example #4
0
 public async Task Post([FromBody] ForcastModel tahmin)
 {
     var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017");
     await mongodbservice.InsertTahmin(tahmin);
 }