Stringy
✅ [EF Core] Why does my database entity have a one-directional FK Connection?
See in the Business screenshot you have
OwnerId nvarchar(450) constraint FK_busi...... references AspNetUsers
, there should be similar for BusinessPromotions. You should see that in VisitsEachMonths
or BusinessImages
definition.7 replies
✅ [EF Core] Why does my database entity have a one-directional FK Connection?
It looks like a column hasn't been defined for the FK. Look at definition for VisitsEachMonths or BusinessImages, it looks like they use BusinessId too, or post a screenshot of one of them here.
7 replies
How to go back to code line in try after Exception occurs?
You have to continue the debugger then get the try block of code to fire again. Once you hit the exception you can’t go back. If you’re trying to see what caused the exception, check the stack trace on the ex parameter
Also I never knew you could drag that yellow arrow when debugging, I’m going to have to try that tomorrow.
6 replies
✅ List doesnt show multiple inputs
You don’t need to keep setting the ItemsSource each time you add a new wizard to your members list. Simply set it once when initialise the window / components. Secondly if you use an ObservableCollection<T> instead of a List<T>, you will get built in INotifyPropertyChange which means you’ll get two way data binding and the list view will “automatically” update when you add a member to that ObservableCollection. If you don’t use an ObservableCollection, you would need to implement INotifyPropertyChanged
40 replies