entity-framework

Repository pattern and ORM change

I know that there were many similar questions, but unfortunately I could not find the answer to them for myself. Probably I w ... ltiple tables? I want to clarify that I am asking this question in the framework of the Repository pattern and not the DAO.

asp.net mvc entity framework conditions

Such a question In C#, I used the{[4] class]} SQLiteConnection myConnection = new SQLiteConnection(Connect); myCo ... northwind.name where Grp.level >= slider_min select new { тут выборка }; }

Error 50 during the initial DATABASE creation

I am writing an application for core 3.0, EF 6. Connection string: "DefaultConnection": "Server=(localdb)\\usersdb;Database=l ... r: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist.

Entity Framework update only one entity (table)

I have a certain model from the Entity Framework. You need to somehow update only 1 entity (that is, fill 1 table with data f ... creating all the content: _dataContext = new MyMagnEntities(); Because I haven't found another way yet. How to do it right?

Please explain how Update works in the Entity Framework

I don't understand how to work with Entity Framework. After Laravel and its ORM, it seems to me a completely unfriendly techn ... ticize my code and I will be grateful for useful comments that could simplify the life of readers. Thanks for your attention!

How can I get information about an interface property in EF from the corresponding implemented class property?

The question is formulated for VB.NET however, the C# answer will also be relevant. This is supposed to be a navigation prope ... d, and Childs. However, the implemented properties themselves have proper names, such as Author or AuthorID. Help with ideas?

Migration error: column already exists

Trying to add a migration: dotnet ef migrations add add_ProductGroup --context migrationsdbcontext dotnet ef database updat ... TeamExplorer. Maybe the column ProductGroupId wasn't deleted from the table Products. It is not clear how to delete it now

Error in EF 6.4 The term 'enable-migrations' is not recognized as the name of a cmdlet, function, script file, or operable program

Previously, I used the code-first approach and there were no problems. The version was installedEntityFramework 6.2.0. The st ... NotFoundException + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Sample WPF+MVVM+EF6 application

Hello. Could you show me a small example of the application code made in WPF (C#) according to the MVVM pattern and the follo ... ng a large application, where there will be a lot of such entities (about 140), I would like to save time, effort and nerves.

Entity Framework and SQLite

Please tell me how to combine Entity Framework and SQLite? I put SQLite in the project already through Nuget. I created the m ... gh by the way, the DB file is created in the folder with the program, but it is 0 bytes, well, plus the error is still there.

Incorrect ConnectionString when connecting to SQLite?

I'm making the simplest console project to see how to work with SQLite. I add the System.Data.SQLite (x86/x64) package from ... em.Data.SQLite.SQLiteFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.

How do I add data to linked tables?

There are two tables. They need to enter the following data from TextBox: class PersonData { public string Firs ... t FOREIGN KEY "FK_Phones_Person". The conflict occurred in the database "NoteBookTest", table "dbo.Person", column 'id'.

LINQ to Entities does not recognize the method 'System.DateTime AddDays(Double)'

Attention! This is a translation of the question Linq to EntityFramework DateTime. Also see a similar question: Lin ... 'System.DateTime AddDays(Double)' method, and this method cannot be translated into a store expression. How do I fix this?

Dynamic Linq query construction

public class BaseEntity { public int Id {get;set;} public DateTime Created {get;set;} public bool IsDeleted {get; ... { //Здесь надеюсь пока неизвестная мне *магия* } } Help me implement the Beetwen{[5] method]}

How to use the Include() method correctly in the Repository pattern?

When building an application, I use the Repository pattern. Repository interface: public interface IShopContext { IQuery ... d that the variables that should contain a reference to an object with a collection of orders are empty. What is the problem?

The INSERT statement conflicted with the FOREIGN KEY constraint "FK dbo.BestPractices dbo.WorkOrder1 Id"

There is a SQL Server database of several tables When executing the program, I encountered the following problem: The IN ... set; } public string RecommendationsClientFutureRepairs { get; set; } public WorkOrder1 WorkOrder1 { get; set; } }

Entity Framework. Error re-writing to the database when communicating one to many

Is used: Entity Framework (Code First), SQLite. There are Topic and User models. The user can create many topics. public cl ... g user, as far as I understand. I need the user not to re-insert Add, but to update AddOrUpdate. Please tell me how to do it?

Differences between the Find () and FirstOrDefault() methods when used with the Entity Framework

If you need to get a record from a database by its primary key, you can use both methods. Both methods will return the entity ... present in the database, otherwise they will return null. What is the difference between them and when which method to use?

Connecting Sqlite to VS17

Good time of day. There was a need to work with Sqlite3 DB using EF, so the question arose, how to connect it, so that in Server Explorer it could be used as MS sql? What are the alternatives to connecting DB? Thanks.

The repository pattern for entity framework Core. Any questions?

I always used the repository pattern, but more as a wrapper that was needed for unit tests, you could embed caching there thr ... сам, эту фишку НЕЛЬЗЯ использовать. 4. Довольно много кода. Is worth whether to bother at all? And what can be improved?