I have this interface:
public interface IUserProfileService {
Implemented by:
public class UserProfileService : IUserProfileService { private readonly string m_userName; public UserProfileService(string userName) { m_userName = userName; } }
I need this to be injected into the controller as follows:
public class ProfilesController : BaseController { private readonly IUserProfileService m_profileService; public ProfilesController(IUserProfileService profileService) { m_profileService = profileService; } }
I do not know how I can register this interface and its implementation in the Ninject container to pass the userName parameter when Ninject enters an instance of this service.
Any ideas how I can achieve this?
source share