Questions tagged as 'entity-framework-6'

1
answer

Entity Framework map some properties

I have a sqlserver database from which I generate the corresponding models with EF. The problem arises because a table in the database for example users is dynamic, it may be that a record appears or not (Address). TABLE USERS with records: I...
asked by 20.07.2016 / 16:19
2
answers

Query linq, matching properties

I'm working with Entity Framework code first, I'm putting together a query but from my entity I only need the first two attributes for which I had to create another class with the attributes I need to not bring me the whole entity. public clas...
asked by 24.05.2016 / 23:24
0
answers

Inventory: update stock according to the amount that the user enters in an input in razor

I'm doing an inventory system, where I have to add or remove stocks of a product. I currently have a table producto where I keep the product data (as well as the amount that I have in stock), and a table movimientoEntrada , where I...
asked by 11.04.2018 / 19:10
1
answer

How to configure DbContext for the name of tables in the singular?

I am starting to work with MVC 5 and Entity Framework 6, I clarify in advance that in my project I am not using visual studio assistants for EF since I want to understand in depth how it works. Well, my problem comes when reading a table from my...
asked by 21.01.2018 / 19:16
1
answer

Paginate the result of a query with Linq

I am working with Entity Framework version 6 together with SQL Server localdb 13.0.2151. I have 4 entities Professors, Resources, Subjects and Assignments. The query I intend to make must retrieve all Assignments along with their Resour...
asked by 06.12.2016 / 17:48
1
answer

Error inserting an entity from the Entity Framework [closed]

I am trying to perform an insertion of a new entity by means of Entity Framework C# in a table with auto-generated Id, but when calling the method SaveChanges() I receive the following error:    A dependent property in a...
asked by 20.08.2016 / 08:58
0
answers

EF6 does not add all the tables to the conceptual model

Good morning, I have an asp.net mvc project that I made with EF5 and I had no problems updating or bringing new tables, however I decided to use the EF6 to test the functionalities it has but it turns out that when I wanted to update my schema s...
asked by 24.05.2016 / 19:19
2
answers

Execute html in asp.net Core Web Applications (.Net framework)

Good afternoon I'm working with angular 1, asp.net Core Web Applications (.Net framework), which created some modules and I could not execute the login view, and when I run I get hello word of the startup. is there no way to tell visual w...
asked by 26.09.2016 / 22:41
2
answers

How to Convert ICollectiont1 in ICollectiont2

I have a LinQ To Entities Query, And an ActivityModel returns to me, but it really does the query to the Activity entity, and I assign each data as you can see it, but it brings me the Orders as Icollection<Orden> , and in Activit...
asked by 25.10.2016 / 23:57
2
answers

Read Only Properties

I am working with Entity Framework. I have a class Compra , when I put a read-only property, what function does it have? Does it come as a property in memory? Is it no longer in the map that is done with the fluent api? I'm working with...
asked by 22.08.2016 / 15:38