mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-28 11:42:28 +00:00
Add database changes for allowing multiple resources
This commit is contained in:
parent
685f57fd28
commit
e63a4b812a
8 changed files with 442 additions and 13 deletions
|
@ -22,6 +22,14 @@ namespace ProjectLighthouse {
|
|||
MySqlServerVersion.LatestSupportedServerVersion
|
||||
);
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder) {
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<Slot>()
|
||||
.Property<string>(nameof(Slot.ResourceCollection))
|
||||
.HasField(nameof(Slot.ResourceCollection));
|
||||
}
|
||||
|
||||
public async Task<User> CreateUser(string username) {
|
||||
User user;
|
||||
if((user = await Users.Where(u => u.Username == username).FirstOrDefaultAsync()) != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue