dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.69k stars 3.17k forks source link

Improve experience for data binding and graphical interfaces #26799

Closed ajcvickers closed 2 years ago

ajcvickers commented 2 years ago

EF Core is designed to work well with data binding scenarios, such as when used with Windows Forms or .NET MAUI. However, connecting the dots between these technologies is not always easy. For EF7, we plan to improve the experience with both work in EF Core and in Visual Studio to make it easier to connect the dots.

knightmeister commented 2 years ago

Hi @bricelam, I'm wondering whether or not there are any thoughts yet as to how you might accomplish this from a high level?

This is something I need now and it would be great to try and align what I'm implementing with what you're building. Is it just going to be a case of the proxy exposing INotifyPropertyChanged?

bricelam commented 2 years ago

The primary work for this issue is to re-enable the Visual Studio tooling to work in more-or-less the same way it used to on .NET Framework.

Our WPF tutorial provides good guidance for databinding in XAML-based frameworks. We'll probably use that as the foundation for thinking about data binding in MAUI and WinUI. See also https://github.com/dotnet/EntityFramework.Docs/issues/2541

ajcvickers commented 2 years ago

Update: verified that WinForms and MAUI work well now. Walkthrough for WinForms has been completed. MAUI demo created and presented; convert to walkthrough tracked by https://github.com/dotnet/EntityFramework.Docs/issues/3984

janseris commented 2 years ago

Hi, there is an important issue to this and that is that EF Core cannot be used in .NET MAUI on Android 8.1 and lower due to their SSL error during SSL handshake during SQL authentication login (which is always encrypted) and noone seems to do anything about it even if I reported it on MAUI, SqlClient etc. months ago. .NET MAUI has similar SSL issues on lower Android with SmptClient, gRPC and had with HttpClient. The EF Core issue is present on Xamarin as well.

https://github.com/dotnet/SqlClient/issues/1662 https://github.com/dotnet/SqlClient/issues/1656 https://github.com/dotnet/maui/issues/9587 https://github.com/dotnet/runtime/issues/74576

roji commented 2 years ago

@janseris we're well aware of this issue, but there's nothing we can do about it in EF Core - it's a problem in SqlClient (and not related to data binding or graphical interfaces).