From 7fb5ecf04a522f6c9fe75e6e43a2fa6092cbbd27 Mon Sep 17 00:00:00 2001 From: Andre Beging Date: Fri, 8 Apr 2022 16:10:26 +0200 Subject: [PATCH] Database updates --- FSSiegen.Diagram1.view | 411 +++++++++++------- FSSiegen.efml | 19 +- .../Entity/Interaction.Generated.cs | 2 +- .../Entity/InteractionType.cs | 2 +- .../Entity/Prospect.Generated.cs | 2 +- .../Entity/User.Generated.cs | 4 +- FoodsharingSiegen.Contracts/Entity/User.cs | 35 +- .../Entity/UserGroup.cs | 28 ++ .../Entity/UserType.cs | 12 +- .../Data/FsContext.Generated.cs | 3 +- .../FoodsharingSiegen.Server.csproj | 1 + .../20220405143853_usergroups.Designer.cs | 178 ++++++++ .../Migrations/20220405143853_usergroups.cs | 26 ++ .../Migrations/FsContextModelSnapshot.cs | 5 + FoodsharingSiegen.Server/Pages/Users.razor.cs | 35 ++ 15 files changed, 583 insertions(+), 180 deletions(-) create mode 100644 FoodsharingSiegen.Contracts/Entity/UserGroup.cs create mode 100644 FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.Designer.cs create mode 100644 FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.cs diff --git a/FSSiegen.Diagram1.view b/FSSiegen.Diagram1.view index 3a7cceb..d5a3577 100644 --- a/FSSiegen.Diagram1.view +++ b/FSSiegen.Diagram1.view @@ -153,26 +153,45 @@ EntityDeveloper.EntityFrameworkCore.EntityProperty + + + 10 + 2 + + + + 0.5 px + 126.5 px + + + 162 px + 18 px + + + bf41429c-3b00-4d34-9851-bf35a3649fd2 + EntityDeveloper.EntityFrameworkCore.EntityProperty + + 163 px - 127 px + 145 px 0 px - 127 px + 145 px - 10 + 11 1 - 11 - 10 + 12 + 11 @@ -187,7 +206,7 @@ 0 px - 126 px + 144 px 163 px @@ -201,20 +220,20 @@ - 208 px - -56 px + 248 px + -64 px 168 px - 212 px + 230 px 100 px - 212 px + 230 px 800 px - 212 px + 230 px @@ -225,20 +244,20 @@ - 12 + 13 0 - 13 - 12 + 14 + 13 - 14 - 13 + 15 + 14 @@ -256,8 +275,8 @@ - 15 - 13 + 16 + 14 @@ -269,14 +288,14 @@ 18 px - fbcf22ae-d06c-4ef4-9375-7da0116c1756 + b61df6d8-6f93-4605-bcb8-40e631176cd7 EntityDeveloper.EnumTypeMember - 16 - 13 + 17 + 14 @@ -288,14 +307,14 @@ 18 px - 5121abf9-8963-4853-92fc-38b4be002089 + 833a2e4b-3cf7-476c-9a9a-3aeb69315f51 EntityDeveloper.EnumTypeMember - 17 - 13 + 18 + 14 @@ -307,56 +326,18 @@ 18 px - 9d01dc6b-a794-47f8-ac79-0ff53861181c - EntityDeveloper.EnumTypeMember - - - - - 18 - 13 - - - - 0.5 px - 72.5 px - - - 144 px - 18 px - - - b9fd95ad-d147-41df-94c7-3eb0c8eadb90 - EntityDeveloper.EnumTypeMember - - - - - 19 - 13 - - - - 0.5 px - 90.5 px - - - 144 px - 18 px - - - b61df6d8-6f93-4605-bcb8-40e631176cd7 + 23192dfc-203b-472d-84cb-63a7708d8b67 EntityDeveloper.EnumTypeMember 145 px - 108 px + 72 px 0 px - 109 px + 73 px @@ -366,15 +347,15 @@ 150 px - 157 px + 121 px 100 px - 157 px + 121 px 800 px - 157 px + 121 px @@ -385,20 +366,20 @@ - 20 + 19 0 - 21 - 20 + 20 + 19 - 22 - 21 + 21 + 20 @@ -416,8 +397,8 @@ - 23 - 21 + 22 + 20 @@ -435,8 +416,8 @@ - 24 - 21 + 23 + 20 @@ -454,8 +435,8 @@ - 25 - 21 + 24 + 20 @@ -473,8 +454,8 @@ - 26 - 21 + 25 + 20 @@ -492,8 +473,8 @@ - 27 - 21 + 26 + 20 @@ -521,14 +502,14 @@ - 28 - 20 + 27 + 19 - 29 - 28 + 28 + 27 @@ -557,8 +538,8 @@ - -136 px - 256 px + -64 px + 216 px 150 px @@ -581,20 +562,20 @@ - 30 + 29 0 - 31 - 30 + 30 + 29 - 32 - 31 + 31 + 30 @@ -612,8 +593,8 @@ - 33 - 31 + 32 + 30 @@ -631,8 +612,8 @@ - 34 - 31 + 33 + 30 @@ -650,8 +631,8 @@ - 35 - 31 + 34 + 30 @@ -669,8 +650,8 @@ - 36 - 31 + 35 + 30 @@ -688,8 +669,8 @@ - 37 - 31 + 36 + 30 @@ -707,8 +688,8 @@ - 38 - 31 + 37 + 30 @@ -726,8 +707,8 @@ - 39 - 31 + 38 + 30 @@ -745,8 +726,8 @@ - 40 - 31 + 39 + 30 @@ -774,14 +755,14 @@ - 41 - 30 + 40 + 29 - 42 - 41 + 41 + 40 @@ -795,8 +776,8 @@ - 43 - 41 + 42 + 40 @@ -853,35 +834,35 @@ - 44 + 43 1 - 30 - 45 - 46 + 29 + 44 + 45 0 - 126 px + 42 px 0 px Left Right Bottom - 45 + 44 FloatAnchor - 174 px + 130 px 0 px Left Right Top - 46 + 45 FloatAnchor @@ -894,20 +875,20 @@ - 47 + 46 0 - 48 - 47 + 47 + 46 - 49 - 48 + 48 + 47 @@ -925,8 +906,8 @@ - 50 - 48 + 49 + 47 @@ -944,8 +925,8 @@ - 51 - 48 + 50 + 47 @@ -963,8 +944,8 @@ - 52 - 48 + 51 + 47 @@ -982,8 +963,8 @@ - 53 - 48 + 52 + 47 @@ -1001,8 +982,8 @@ - 54 - 48 + 53 + 47 @@ -1020,8 +1001,8 @@ - 55 - 48 + 54 + 47 @@ -1073,47 +1054,47 @@ - 56 - 20 - 30 - 57 - 58 + 55 + 19 + 29 + 56 + 57 0 0 px - 97 px + 153 px Top Bottom Right - 57 + 56 FloatAnchor 0 px - 108.319587628866 px + 41 px Top Bottom Left - 58 + 57 FloatAnchor - 34 px - 353 px + 106 px + 369 px - 34 px - 364.319587628866 px + 106 px + 297 px false @@ -1122,6 +1103,128 @@ EntityDeveloper.EntityFrameworkCore.EntityAssociation + + + 58 + 0 + + + + + 59 + 58 + + + + + 60 + 59 + + + + 0.5 px + 0.5 px + + + 144 px + 18 px + + + 9ff50531-16aa-4d56-acfa-cb983730f31c + EntityDeveloper.EnumTypeMember + + + + + 61 + 59 + + + + 0.5 px + 18.5 px + + + 144 px + 18 px + + + 241d5c4f-cd27-424c-bdae-6afbe2cb9f50 + EntityDeveloper.EnumTypeMember + + + + + 62 + 59 + + + + 0.5 px + 36.5 px + + + 144 px + 18 px + + + a937ae3b-e838-4358-a5f0-a3f9f90c995b + EntityDeveloper.EnumTypeMember + + + + + 63 + 59 + + + + 0.5 px + 54.5 px + + + 144 px + 18 px + + + 9b51d8d2-0901-4bee-aa6a-c62a0508b7c0 + EntityDeveloper.EnumTypeMember + + + + + 145 px + 72 px + + + 0 px + 73 px + + + + + 40 px + -160 px + + + 150 px + 121 px + + + 100 px + 121 px + + + 800 px + 121 px + + + + 01b07848-c72f-4d42-bdf5-6581d9c5de33 + EntityDeveloper.EntityFrameworkCore.EntityEnumType + + 22 px + 8 px diff --git a/FSSiegen.efml b/FSSiegen.efml index add8cac..c32d8c8 100644 --- a/FSSiegen.efml +++ b/FSSiegen.efml @@ -2,12 +2,10 @@ - - - - - - + + + + @@ -18,6 +16,12 @@ + + + + + + @@ -41,6 +45,9 @@ + + + diff --git a/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs b/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs index ce569f6..80dfbff 100644 --- a/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs +++ b/FoodsharingSiegen.Contracts/Entity/Interaction.Generated.cs @@ -2,7 +2,7 @@ // This is auto-generated code. //------------------------------------------------------------------------------ // This code was generated by Entity Developer tool using EF Core template. -// Code is generated on: 04.04.2022 16:38:40 +// Code is generated on: 05.04.2022 16:38:00 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/InteractionType.cs b/FoodsharingSiegen.Contracts/Entity/InteractionType.cs index 1ae092f..251de19 100644 --- a/FoodsharingSiegen.Contracts/Entity/InteractionType.cs +++ b/FoodsharingSiegen.Contracts/Entity/InteractionType.cs @@ -2,7 +2,7 @@ // This is auto-generated code. //------------------------------------------------------------------------------ // This code was generated by Entity Developer tool using EF Core template. -// Code is generated on: 04.04.2022 16:38:40 +// Code is generated on: 05.04.2022 16:38:00 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs b/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs index 3649bd6..52dc143 100644 --- a/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs +++ b/FoodsharingSiegen.Contracts/Entity/Prospect.Generated.cs @@ -2,7 +2,7 @@ // This is auto-generated code. //------------------------------------------------------------------------------ // This code was generated by Entity Developer tool using EF Core template. -// Code is generated on: 04.04.2022 16:38:40 +// Code is generated on: 05.04.2022 16:38:00 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/FoodsharingSiegen.Contracts/Entity/User.Generated.cs b/FoodsharingSiegen.Contracts/Entity/User.Generated.cs index a54f0be..cb3b5ed 100644 --- a/FoodsharingSiegen.Contracts/Entity/User.Generated.cs +++ b/FoodsharingSiegen.Contracts/Entity/User.Generated.cs @@ -2,7 +2,7 @@ // This is auto-generated code. //------------------------------------------------------------------------------ // This code was generated by Entity Developer tool using EF Core template. -// Code is generated on: 04.04.2022 16:38:40 +// Code is generated on: 05.04.2022 16:38:00 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -40,6 +40,8 @@ namespace FoodsharingSiegen.Contracts.Entity public virtual string EncryptedPassword { get; set; } + public virtual string Groups { get; set; } + public virtual IList Interactions { get; set; } #region Extensibility Method Definitions diff --git a/FoodsharingSiegen.Contracts/Entity/User.cs b/FoodsharingSiegen.Contracts/Entity/User.cs index 0f96ff8..24bea47 100644 --- a/FoodsharingSiegen.Contracts/Entity/User.cs +++ b/FoodsharingSiegen.Contracts/Entity/User.cs @@ -1,23 +1,42 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; -using System.Data; -using System.Data.Common; -using System.Linq; -using System.Linq.Expressions; using FoodsharingSiegen.Shared.Helper; namespace FoodsharingSiegen.Contracts.Entity { + /// + /// The user class (a. beging, 06.04.2022) + /// public partial class User { + #region Public Properties + + /// + /// Gets or sets the value of the groups list (ab) + /// + [NotMapped] + public List GroupsList + { + get + { + if (string.IsNullOrWhiteSpace(Groups)) return new List(); + var stringList = Groups.Split(","); + var enumList = stringList.Where(x => !string.IsNullOrWhiteSpace(x)).Select(Enum.Parse).ToList(); + return enumList; + } + set => Groups = string.Join(",", value); + } + + /// + /// Gets or sets the value of the password (ab) + /// [NotMapped] public string Password { - get => AuthHelper.Decrypt(EncryptedPassword); + get => AuthHelper.TryDecrypt(EncryptedPassword, out var password) ? password : string.Empty; set => EncryptedPassword = AuthHelper.Encrypt(value); } + + #endregion } } diff --git a/FoodsharingSiegen.Contracts/Entity/UserGroup.cs b/FoodsharingSiegen.Contracts/Entity/UserGroup.cs new file mode 100644 index 0000000..5006407 --- /dev/null +++ b/FoodsharingSiegen.Contracts/Entity/UserGroup.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// This is auto-generated code. +//------------------------------------------------------------------------------ +// This code was generated by Entity Developer tool using EF Core template. +// Code is generated on: 05.04.2022 16:38:00 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.Common; +using System.Linq; +using System.Linq.Expressions; + +namespace FoodsharingSiegen.Contracts.Entity +{ + public enum UserGroup : int + { + ReadOnly = 100, + WelcomeTeam = 200, + StoreManager = 300, + Ambassador = 400 + } +} diff --git a/FoodsharingSiegen.Contracts/Entity/UserType.cs b/FoodsharingSiegen.Contracts/Entity/UserType.cs index fc78de8..2a64384 100644 --- a/FoodsharingSiegen.Contracts/Entity/UserType.cs +++ b/FoodsharingSiegen.Contracts/Entity/UserType.cs @@ -2,7 +2,7 @@ // This is auto-generated code. //------------------------------------------------------------------------------ // This code was generated by Entity Developer tool using EF Core template. -// Code is generated on: 04.04.2022 16:38:40 +// Code is generated on: 05.04.2022 16:38:00 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -20,11 +20,9 @@ namespace FoodsharingSiegen.Contracts.Entity { public enum UserType : int { - Unverified = 0, - ReadOnly = 10, - WelcomeTeam = 20, - StoreManager = 30, - Ambassador = 40, - Admin = 50 + Unverified = 100, + User = 200, + Admin = 300, + nix = 50 } } diff --git a/FoodsharingSiegen.Server/Data/FsContext.Generated.cs b/FoodsharingSiegen.Server/Data/FsContext.Generated.cs index 6324fae..fffcd0a 100644 --- a/FoodsharingSiegen.Server/Data/FsContext.Generated.cs +++ b/FoodsharingSiegen.Server/Data/FsContext.Generated.cs @@ -2,7 +2,7 @@ // This is auto-generated code. //------------------------------------------------------------------------------ // This code was generated by Entity Developer tool using EF Core template. -// Code is generated on: 04.04.2022 16:38:40 +// Code is generated on: 05.04.2022 16:38:00 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -101,6 +101,7 @@ namespace FoodsharingSiegen.Server.Data modelBuilder.Entity().Property(x => x.Name).HasColumnName(@"Name").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().Property(x => x.EncryptedPassword).HasColumnName(@"EncryptedPassword").IsRequired().ValueGeneratedNever(); + modelBuilder.Entity().Property(x => x.Groups).HasColumnName(@"Groups").IsRequired().ValueGeneratedNever(); modelBuilder.Entity().HasKey(@"Id"); } diff --git a/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj b/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj index 0da685b..2fd10f9 100644 --- a/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj +++ b/FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj @@ -13,6 +13,7 @@ + diff --git a/FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.Designer.cs b/FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.Designer.cs new file mode 100644 index 0000000..2195a6c --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.Designer.cs @@ -0,0 +1,178 @@ +// +using System; +using FoodsharingSiegen.Server.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace FoodsharingSiegen.Server.Migrations +{ + [DbContext(typeof(FsContext))] + [Migration("20220405143853_usergroups")] + partial class usergroups + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.1"); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Alert") + .HasColumnType("INTEGER") + .HasColumnName("Alert"); + + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + + b.Property("Date") + .HasColumnType("TEXT") + .HasColumnName("Date"); + + b.Property("Info") + .HasColumnType("TEXT") + .HasColumnName("Info"); + + b.Property("NotNeeded") + .HasColumnType("INTEGER") + .HasColumnName("NotNeeded"); + + b.Property("ProspectId") + .HasColumnType("TEXT") + .HasColumnName("ProspectId"); + + b.Property("Type") + .HasColumnType("INTEGER") + .HasColumnName("Type"); + + b.Property("UserId") + .HasColumnType("TEXT") + .HasColumnName("UserId"); + + b.HasKey("Id"); + + b.HasIndex("ProspectId"); + + b.HasIndex("UserId"); + + b.ToTable("Interactions", (string)null); + }); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + + b.Property("FsId") + .HasColumnType("INTEGER") + .HasColumnName("FsId"); + + b.Property("Memo") + .HasColumnType("TEXT") + .HasColumnName("Memo"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Name"); + + b.Property("ProgressId") + .HasColumnType("TEXT") + .HasColumnName("ProgressId"); + + b.HasKey("Id"); + + b.ToTable("Prospects", (string)null); + }); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasColumnName("Id"); + + b.Property("Created") + .HasColumnType("TEXT") + .HasColumnName("Created"); + + b.Property("EncryptedPassword") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("EncryptedPassword"); + + b.Property("Groups") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Groups"); + + b.Property("Mail") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Mail"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Name"); + + b.Property("Type") + .HasColumnType("INTEGER") + .HasColumnName("Type"); + + b.Property("Verified") + .HasColumnType("INTEGER") + .HasColumnName("Verified"); + + b.HasKey("Id"); + + b.ToTable("Users", (string)null); + }); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b => + { + b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect") + .WithMany("Interactions") + .HasForeignKey("ProspectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User") + .WithMany("Interactions") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Prospect"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b => + { + b.Navigation("Interactions"); + }); + + modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b => + { + b.Navigation("Interactions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.cs b/FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.cs new file mode 100644 index 0000000..9c6264f --- /dev/null +++ b/FoodsharingSiegen.Server/Migrations/20220405143853_usergroups.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace FoodsharingSiegen.Server.Migrations +{ + public partial class usergroups : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Groups", + table: "Users", + type: "TEXT", + nullable: false, + defaultValue: ""); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Groups", + table: "Users"); + } + } +} diff --git a/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs b/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs index 7fcac87..be49047 100644 --- a/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs +++ b/FoodsharingSiegen.Server/Migrations/FsContextModelSnapshot.cs @@ -114,6 +114,11 @@ namespace FoodsharingSiegen.Server.Migrations .HasColumnType("TEXT") .HasColumnName("EncryptedPassword"); + b.Property("Groups") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("Groups"); + b.Property("Mail") .IsRequired() .HasColumnType("TEXT") diff --git a/FoodsharingSiegen.Server/Pages/Users.razor.cs b/FoodsharingSiegen.Server/Pages/Users.razor.cs index 53f27a3..58b8df2 100644 --- a/FoodsharingSiegen.Server/Pages/Users.razor.cs +++ b/FoodsharingSiegen.Server/Pages/Users.razor.cs @@ -37,6 +37,14 @@ namespace FoodsharingSiegen.Server.Pages /// private List? UserList { get; set; } + public User? SelectedUser { get; set; } + + public IEnumerable UserGroups => Enum.GetValues(); + + public List Companies { get; set; } + public List SelectedCompanies { get; set; } + public List SelectedCompanyTexts { get; set; } = new(); + #endregion #region Override OnAfterRenderAsync @@ -55,6 +63,21 @@ namespace FoodsharingSiegen.Server.Pages #endregion + protected override void OnInitialized() + { + Companies = new List + { + new Company{Name = "Germany", ISO = "DE"}, + new Company{Name = "USA", ISO = "US"}, + new Company{Name = "England", ISO = "GB"}, + new Company{Name = "Austria", ISO = "AT"} + }; + + SelectedCompanies = new List {UserGroups.ElementAt(2)}; + + base.OnInitialized(); + } + #region Private Method Chang /// @@ -119,5 +142,17 @@ namespace FoodsharingSiegen.Server.Pages } #endregion + + private async Task SelectedChanged(List arg) + { + + } + } + + public class Company + { + public string Name { get; set; } + + public string ISO { get; set; } } } \ No newline at end of file