public async Task <string> GetDBWorkshopMapCreator(ulong id) { using IServiceScope scope = this.scopeFactory.CreateScope(); using IntruderContext db = scope.ServiceProvider.GetRequiredService <IntruderContext>(); AgentsDB agent = new AgentsDB(); if (this.agentService.CheckDBAgent(id)) { agent = await this.agentService.GetDBAgentAsync(id); } else { await this.agentService.StoreAgentDBAsync(id); agent = await this.agentService.GetDBAgentAsync(id); } return(agent.Name); }
public static void InitializeForms() { SuppliersDB.InitializeList(); ProductsDB.InitializeList(); AgentsDB.InitializeList(); }