Пример #1
0
        private static void loadValues()
        {
            loading = true;
            using (var db = new pileEntities())
                config = db.Settings.ToDictionary(x => x.Id, x => x.ConfigValue);

            loading = false;
        }
Пример #2
0
        public async Task <HttpResponseMessage> Get()
        {
            using (pileEntities db = new pileEntities())
            {
                var invMethods = await db.InvoiceMethods.Select(x => new { Id = x.Id, Name = x.Name }).ToListAsync();

                return(Request.CreateResponse(HttpStatusCode.OK, invMethods));
            }
        }