public void Demo( [FromServices] ISession session, [FromServices] AuthenticationManager manager, [FromServices] UserDAO userDAO, [FromServices] TableDAO tableDAO, [FromServices] FieldDAO fieldDAO, [FromServices] ViewDAO viewDAO) { if (session.QueryOver <User>().RowCount() == 0) { User user = userDAO.Insert(new User() { Login = "******", Password = "******", Email = "*****@*****.**", Configuration = new UserConfigurationDTO() }); Table table = tableDAO.Insert(new Table() { Label = new BundleDTO(Langage.FRA, "Contact"), Code = "contacts", Configuration = new TableConfigurationDTO() { Archived = false } }); Field field_lastname = fieldDAO.Insert(new Field() { Label = new BundleDTO(Langage.FRA, "Nom"), Code = "lastname", Configuration = new StringFieldConfigurationDTO() { }, Table = table }); Field field_firstname = fieldDAO.Insert(new Field() { Label = new BundleDTO(Langage.FRA, "Prénom"), Code = "firstname", Configuration = new StringFieldConfigurationDTO() { }, Table = table }); View admin_view = viewDAO.Insert(new View() { Label = new BundleDTO(Langage.FRA, "Administration"), Configuration = new AdminViewConfigurationDTO() { } }); View list_view = viewDAO.Insert(new View() { Label = new BundleDTO(Langage.FRA, "Mode liste"), Configuration = new ListViewConfigurationDTO() { Table = table } }); } ; }