예제 #1
0
        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);
        }
예제 #2
0
 public static void InitializeForms()
 {
     SuppliersDB.InitializeList();
     ProductsDB.InitializeList();
     AgentsDB.InitializeList();
 }