public IActionResult Seed() { try { _newsRepository.ClearAll(); } catch (Exception e) { return(BadRequest("Gick inte att tömma databasen.")); } try { _newsRepository.Add(new NewsArticle() { Title = "Title1", Header = "Header1", Body = "Body1" }); _newsRepository.Add(new NewsArticle() { Title = "Title1", Header = "Header2", Body = "Body2" }); } catch (Exception e) { return(BadRequest("Gick inte att seeda.")); } return(Ok("Reseedat databasen.")); }