public DashItem CreateDashitem(bool adminGraph, string type, int aantalDagenTerug, string naam = "usergraph", string town = "Vlaanderen") { InitNonExistingRepo(); DashItem dashItem = new DashItem() { LastModified = DateTime.Now, Type = type, AantalDagen = aantalDagenTerug, Naam = naam, Town = town, Active = true }; if (adminGraph) { dashItem.AdminGraph = true; } else { dashItem.AdminGraph = false; } repo.AddDashItem(dashItem); return(dashItem); }