xaml mvvm efcore IOC
PharmaSoft
1
Reputation point
Hello
In IOC, I have this exemple in the modelview
public ReqCaisse(IDataContext database)
{
dataBase = database;
}
and from the view, it creates a new modelview
<b:Interaction.Triggers>
<b:EventTrigger EventName="Loaded">
<b:CallMethodAction MethodName="LoadView" TargetObject="{StaticResource ResourceKey=CaisseRows}" />
</b:EventTrigger>
</b:Interaction.Triggers>
so I have to put then static property for dataBase public static IDataContext dataBase;
Could you tell me how I can do it without using the static ? I know it is not from devexpress tools but i could help me if you give me somme infos I had this page https://community.devexpress.com/blogs/wpf/archive/2022/02/07/dependency-injection-in-a-wpf-mvvm-application.aspx but not enough infos for me Thanks a lot
Sign in to answer