private static void loadValues() { loading = true; using (var db = new pileEntities()) config = db.Settings.ToDictionary(x => x.Id, x => x.ConfigValue); loading = false; }
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)); } }