public override void OnActionExecuting(HttpActionContext actionContext) { string httpVerb = actionContext.Request.Method.Method.ToUpper(); if (httpVerb != "GET") { IExpensesDbContext context = (IExpensesDbContext)actionContext.Request.GetDependencyScope().GetService(typeof(IExpensesDbContext)); context.BeginTransaction(); } }
public TotalExpenseBetweenDatesQueryHandler(IExpensesDbContext ctx, IMapper mapper) { _ctx = ctx; _mapper = mapper; }
public CreateExpensesHandler(IExpensesDbContext ctx) { _ctx = ctx; }