public async Task <JsonResult> Get() { var monogDbService = new MongoDBMain("Project", "PlantProfiles", @"mongodb+srv://Llamaxy:[email protected]/test?retryWrites=true"); var allPlantsProfiles = await monogDbService.GetAllPlantsProfiles(); return(Json(allPlantsProfiles)); }
public async void Post([FromBody] PlantProfile plants) { var monogDbService = new MongoDBMain("Project", "PlantProfiles", "mongodb://ea9d9986e87a086f47cf3eedf97735a3"); await monogDbService.InsertPlantsProfile(plants); }