public async Task <JsonResult> Get() { var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017"); var tumtahminler = mongodbservice.GetAllTahmin(); return(Json(tumtahminler)); }
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); }
public void Delete(string id) { var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017"); mongodbservice.DeleteTahmin(new ObjectId(id)); }
public async Task Post([FromBody] ForcastModel tahmin) { var mongodbservice = new MongoDbServicesForcast("HDTest", "Forcast", "mongodb://127.0.0.1:27017"); await mongodbservice.InsertTahmin(tahmin); }