In the mvc5 project, I want to take database data fill in Redis at Application_Start
. but at that time IocManager
registration not completed. What should I do to solve this problem (don't use ADO.Net)
You can feed your Redis application in PostInitialize method of WebMvcModule.cs class.
In the sample code, I am retrieving users from the database.
public override void PostInitialize()
{
var userRepository = IocManager.Resolve<IRepository<User, long>>();
var users = userRepository.GetAllList();
/* Feed the Redis here... */
}