u/HorrificFlorist

▲ 0 r/dotnet

I am using interceptors to capture and enrich data (different interceptors) upon Save and SaveAsync with EF Core.

I have a new scenario where i need the data capture and/or enrich to be disabled only for the immediate execution.
Some cases i will disable one, others multiple.

Is there a best practice approach to doing this?

UPDATES re questions:

  1. Interceptors were implemented to remove the need to think about running this extra logic on every db save/saveasync call. 99.9% of time they are used, 0.1% is the scenario we need to cover now. Clearly separates the business logic from enrichment logic which is used for other reasons.
  2. Setting property per interceptor means if 2 save processes occur at same time, and the second one is the one thats needs property as false, the first one is impacted by it too
  3. I have evaluated property based, I am evaluating scoped, separate context hence now seeking general input in regards to best practices

Appreciate those that geniuinely are seeking to help but understanding and ask questions. For those basement dwelling mouthbreathers that are sending stupid messages, please go see a psychiatrist.

reddit.com
u/HorrificFlorist — 20 days ago

If you like many others plan on cancelling your GHCP in may make sure you plan your dev time around the rate limits, daily and weekly don'y align with calendar months as i've noticed (this weeks limit finishes on 4th May for me, yet new billing cycle is 1st May).

Daily and Weekly Limits have obvisouly been put in to slow down consumption till 1st of june, which my guess is they will ease up substantially because the costs will skyrocket and in words of Dave Chappelle as a customer "because fuck you thats why"

reddit.com
u/HorrificFlorist — 23 days ago

With the new structure coming in place 1st June which is usage/token based is unfortunate but nothing scary.

However most of the costs are increased by at least 3x, which begs to differ why not just plug in own API keys from your fav providers and go nuts.

So in that context, I am genuinely trying to understand what is the benefit of staying on Github Copilot when its cheaper to go direct to provider?

Note: Doomsayers and naysayers, I get it, but i genuinely seeking to understand the competitive advantage of staying with GHCP.

reddit.com
u/HorrificFlorist — 24 days ago