nincje_problem

private static void RegisterServices(IKernel kernel) { //First one is working kernel.Bind<IBookingRepo>().To<BookingsRepo>(); //We can not have it here what is the solution kernel.Bind<IRestaurantRepo>().To<RestaurantRepo>(); } //second repo class public class RestaurantRepo : IRestaurantRepo { //should we initialize ApplicationDbContext second time in another repo? ApplicationDbContext db = new ApplicationDbContext(); ... }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.