Thank you for your feedback! I'm glad you enjoyed the video. IOptionsSnapshot is a scoped services and this is best used in scenarios where you have a scoped service or a short-lived object and need the freshest configuration for every request. It’s perfect for a web application where settings can change per request. IOptionsMonitor is a Singleton service that retrieves current option values anytime, ideal for reacting to runtime configuration changes like switching database connections.
Hey Pooran, i recently encountered a problem in .net core where i need to perform a put operation on a main model and CRUD on its sub model, I was not able to achieve this at a same time as this was making a conflict between the entity tracking system, finally i added the ignore in the mapping, Do have more accurate way to achieve that thing? I will really appreciate your effort 😊😊
@@PoornaSoysaTech hey sorry for the late reply Suppose I have A model public class Generation{ //some initial props public Icollection subgens {get;set;} } now what i want is that in repository i will do like """" return _context.generations.include(s => s.subgens) """" now in controller i want to perform CRUD on subgen as well as the generation itself did you got my point
Great demonstration, thanks for effort.
What would be a good use case scenario for the IOptionsSnapshot and IOptionsMonitor interfaces?
Thank you for your feedback! I'm glad you enjoyed the video.
IOptionsSnapshot is a scoped services and this is best used in scenarios where you have a scoped service or a short-lived object and need the freshest configuration for every request. It’s perfect for a web application where settings can change per request.
IOptionsMonitor is a Singleton service that retrieves current option values anytime, ideal for reacting to runtime configuration changes like switching database connections.
Hey Pooran,
i recently encountered a problem in .net core where i need to perform a put operation on a main model and CRUD on its sub model,
I was not able to achieve this at a same time as this was making a conflict between the entity tracking system,
finally i added the ignore in the mapping, Do have more accurate way to achieve that thing?
I will really appreciate your effort 😊😊
Hi, Can you explain more with sample code?
@@PoornaSoysaTech hey sorry for the late reply
Suppose I have A model
public class Generation{
//some initial props
public Icollection subgens {get;set;}
}
now what i want is that
in repository i will do like
""""
return _context.generations.include(s => s.subgens)
""""
now in controller i want to
perform CRUD on subgen as well as the generation itself
did you got my point
@@buck1998read about query filters they will help u i hop