コード例 #1
0
ファイル: WorkshopService.cs プロジェクト: BloonBot/Bloon
        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
ファイル: Program.cs プロジェクト: yuuuchu/DesktopApp
 public static void InitializeForms()
 {
     SuppliersDB.InitializeList();
     ProductsDB.InitializeList();
     AgentsDB.InitializeList();
 }