public async static Task WriteDbContext(this CalcDbContext _db, int id, string message)
        {
            CalcResult calcResult = new CalcResult()
            {
                Insert_Date    = DateTimeOffset.UtcNow,
                Value          = message,
                CalcFunctionId = id
            };
            await _db.CalcResults.AddAsync(calcResult);

            await _db.SaveChangesAsync();
        }
Esempio n. 2
0
 public CitiesController(CalcDbContext context)
 {
     _context = context;
 }
Esempio n. 3
0
 public HomeController(CalcDbContext ctx, ILogger <CalcDbContext> logger)
 {
     calcContext = ctx;
     Logger      = logger;
 }
 public CalculateService(CalcDbContext context)
 {
     _context = context;
 }
 public CalcController(CalcDbContext calcDbContext, ILogger <CalcController> logger)
 {
     _calculatorSoap = new CalculatorSoapClient(CalculatorSoapClient.EndpointConfiguration.CalculatorSoap12);
     _db             = calcDbContext;
     _logger         = logger;
 }
Esempio n. 6
0
 public HomeController(CalcDbContext context)
 {
     _db = context;
 }