How can I inject my CustomerRepository into my CustomerVM view model? In my view, a WPF Page I have:
<Page.DataContext> <viewModel:CustomerVM/> </Page.DataContext>
But my view model constructor obviously has parameter passed in,
public CustomerVM(ICustomerRepository customerRepository) { //this._customerRepository = customerRepository; }
I get
Type 'CustomerVM' is not usable as an object element because it is not public or does not define a public parameterless constructor or a type converter.
Really struggling to heck.
Any help appreciated.