예제 #1
0
        public async Task ChangeProposeCount()
        {
            int countFields = await countProposeRepository.CountAsync();

            if (countFields == 0)
            {
                CountPropose c = new CountPropose();
                c.Count = 1;
                await countProposeRepository.Create(c);
            }
            CountPropose countPropose = await countProposeRepository.Get().FirstOrDefaultAsync();

            countPropose.Count = countPropose.Count + 1;
            await countProposeRepository.Update(countPropose);
        }
예제 #2
0
        public async ValueTask <int> GetCount()
        {
            CountPropose c = await countProposeRepository.Get().FirstOrDefaultAsync();

            return(c.Count);
        }