can I use ef-core in c++ win 32?

mc 6,701 Reputation points
2026-01-18T01:47:33.8166667+00:00

I want to use efcore in win32 and can i use it ? in x64 windows

i found it perfect.

Windows development | Windows API - Win32
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jack Dang (WICLOUD CORPORATION) 11,820 Reputation points Microsoft External Staff Moderator
    2026-01-19T03:40:32.12+00:00

    Hi @mc ,

    Thanks for reaching out.

    EF Core is a .NET library and is designed to be used with .NET languages like C#. A classic Win32 application written in C++ does not run on .NET, so EF Core can’t be used directly in that environment, even on x64 Windows.

    There are technically some indirect and advanced ways to make it work (for example, creating a separate C#/.NET component that uses EF Core and calling it from C++ via interop), but this adds a lot of complexity and is usually not recommended for typical Win32 applications.

    If you’re building a C++ Win32 app, a more practical approach is to use database libraries that are intended for C++, such as SQLite, ODBC, or native client libraries for SQL Server, MySQL, or PostgreSQL. These integrate much more naturally with C++ and Win32.

    If EF Core is a strong requirement, you may want to consider building the application (or at least the data-access layer) as a .NET application instead of a pure C++ Win32 app.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-01-18T01:47:42.58+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Entity Framework Core (EF Core) is primarily designed for use with .NET applications. It is not natively supported in C++ applications, including Win32 applications. EF Core is a .NET library, and thus, it requires a .NET runtime environment to function properly. If you are developing a Win32 application in C++, you would typically use other data access methods that are compatible with C++ rather than EF Core.

    If you are looking for data access solutions in a C++ Win32 environment, you may want to consider using ADO.NET or other database connectivity options that are more suited for C++ applications.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.