public async Task <ActionResult <bool> > PostFloodData([FromBody] FloodData floodData) { if (!ModelState.IsValid) { loggerFactory.LogError("Bad flood data sent in request"); return(BadRequest(floodData)); } else { loggerFactory.LogError("Successfully saved flood data"); floodData.Created = DateTime.Now; var response = repositoryService.Create(floodData); } return(true); }
public void Setup() { floodData = new FloodData(); }