Showing posts from September, 2020

EF Core two data models on two separate projects / dlls with a relationship

Again stuck on my learn / dream project WorkNxt , what i though is a very simple task turn out to be a bit tricky. as i am trying to separate each module and load things at runtime and use DI, i encountered a problem that one of the data models i created under one module need to have EF relationship with another data model on another module, each of course was on a separate project / dll. ideally i didn't want to reference the other module project but to make things even more difficult this was one-to-one relationship and i needed it from both sides and i needed to use it on a ThenInclude as i want to include data from one of the models on the results of the other one. So even if i was ok with cross modules reference which i was trying to avoid i will fall for circular reference trap as you would need to use each class on the other to create the relationship. After many hours of banging my head against the wall, and trying a couple of suggestions from EF core team through the issu

Tabulator on Bootstrap tab

As i was going on my project WorkNxt , i found a new interesting problem. i mean this one of the main reasons i started this anyway, is to find and solve interesting problems!  i am using Tabulator and Bootstrap along with other JS and CSS libraries on this project, and what i wanted was very simple, to have a bootstrap tab navigator with two tabs each with a Tabulator table on it. Simple?, not really, see what i found out is for some reason Tabulator might have trouble rendering in a Div with css display set to none, which is exactly the not shown yet tab(s) would be. How did i resolve this, and i would dare to say it's a very good solution, is the little JS script below function redrawTable() { tabulatorTable.redraw(); $('#detials-tab a[href="#TargetTab"]').unbind('', redrawTable); } $('#detials-tab a[href="#TargetTab"]').on('', redrawTable);