menu

Recent questions tagged entity-framework

1 vote
1 answer
How do I transfer data from one table to another? there are two tables Book, Cart. how to transfer data from book to cart? if cards have different names ...
by DD-var
asked Mar 24, 2021
1 vote
1 answer
How to update a MySQL database, C I connected the base, created a context, models, then wrote enable-migrations, add-migration - everything is fine I type update-database - gives an error "The input stri ...
by authoraytee
asked Mar 8, 2021
1 vote
2 answers
Why is there no connection to the remote MSSQL server? I got a project with EF6 on board. I'm trying to connect to an existing database on a remote server via Web.config. <entityFramework> <defaultConnectionFacto ...
1 vote
1 answer
MySQL C Good day! I am currently working with a MySQL database through a C application And this is the code: var user = db.users.Where(x => x.login == "Логин").FirstOrDefaul ...
by Senture
asked Mar 6, 2021
1 vote
2 answers
How do you organize a one-to-one connection? Hi, does anyone have an example of how a one-to-one relationship should be properly set in entity framework via data annotations. Everything I've tried is very questiona ...
by egorggegor
asked Feb 28, 2021
1 vote
2 answers
How to apply migration correctly? Good afternoon. I have a database with a table dbo.Services in which I need to add another column isPopular, in the object I wrote the field public virtual bool? isPopul ...
by Wintego
asked Feb 21, 2021
1 vote
1 answer
Does the second operation start before the first? I have a base on EntityFramework and TelegramBot package. I'm trying to make a simple Select by ChatId: var chatId = message.Chat.Id;var cour = Db.Couriers.Where(x => ...
1 vote
2 answers
Ms SQL server load jumps. where to look? Looked at the profiler (load normal selections). (but the point is if you reboot the machine then (30-40k of the same pass normal. just after a while the load surges. ) ...
1 vote
2 answers
Why doesn't In Memory Database autogenerate int property? In Memory Database does not autogenerate int property, what? I'm trying to detect a simple intrinsic value builder.Property(x => x.SerialNumber).ValueGeneratedOnAdd( ...
by netcore
asked Feb 12, 2021
1 vote
1 answer
How do I request a username and password comparison? How to retrieve the login and password from the database and compare them with the input data that were entered in thetextbox using (ApplicationContext db = new Applica ...
by evgenysemashko
asked Feb 12, 2021
2 votes
1 answer
image
Why do I get an error when creating a SQLite database in C I created two models and a data context. Made migration (Add-Migration Initial) and ran the command to create a database (Update-Database), the database was created, but ...
by MrLumus
asked Feb 10, 2021
1 vote
2 answers
It won't initialize the variable. Why is it not initialized? The variable is not initialized`connectionString` and throws an exception `System.ArgumentNullException: "Значение не может быть неопределенным.Имя параметра: connection ...
by evgenysemashko
asked Feb 10, 2021
2 votes
1 answer
What is the right way to handle columns of a compound table in EF core (code first)? Studying EF core and working with Postgres, I faced the problem of organizing the accounting of goods in the warehouse. For example: There are more than 2 tables to stor ...
by FortaRoot
asked Feb 9, 2021
1 vote
1 answer
How to change the structure of the model (tables) generated by Entity Framework? Technologies used Entity Framework ASP.NET CORE 3.1 Suppose that initially the following model was formed, which was then transformed into a table public class MyMode ...
by mrFrip
asked Feb 6, 2021
1 vote
2 answers
How do I implement input validation when a button is pressed? I want to implement a check of correctness of all input data in registration fields and after pressing the Registration button, the method should check all the input dat ...
by evgenysemashko
asked Feb 6, 2021
1 vote
1 answer
Why does migration not work? I want to add a migration to the database, but the Update-Database migration fails, because it kicks out error . The created migration code itself using Microsoft.Ent ...
by evgenysemashko
asked Feb 6, 2021
1 vote
1 answer
How do I insert new objects into EF? Let's say I have 2 contexts with the same structure and I'm updating data from one context to the other. Somewhere it is updated, and somewhere you need to insert compl ...
by iluxa1810
asked Feb 4, 2021
1 vote
2 answers
How to remove an item from Entity Framework DbContext?Good day! Tell me how to fix the following situation. There are BookContext db (DbContext), which is connected to the same table in Oracle DB. New entries are added from ...
1 vote
1 answer
How to hook up Entity Framework for Oracle DB?Good day, the Toaster! Recently started to learn Entity Framework (in the study of MVC) and encountered a problem: cannot pull data from a table. When you try to run the ...
2 votes
1 answer
Whether to use triggers in conjunction with ORM?I began to understand, what is ORM and how it works. Previously, to interact with the database used ADO, on the side of the base used triggers and stored procedures. If I ...