Questions tagged as 'entity-framework'

1
answer

Database inheritance

I'm developing an application, where I have 3 tables that have the same attributes, but since they had attributes in those tables that were mandatory for some, not for others, I decided to separate them into 3 different tables. However, I'm havi...
asked by 10.11.2014 / 23:51
1
answer

Search with Checkbox

I'm trying to create a search system in my application where the user can search the site's publications according to the genre. I can list the registered genres with checkbox, but I'm lost to do the search query from there. I have the follow...
asked by 15.11.2014 / 21:22
1
answer

Make a SQL query with Entity Framework 4

How do I perform a query on the database using Entity Framework 4 by passing a previously stored string within a StringBuilder . The reason is that the SQL query string is giant. I know it is not a good practice, but for now I will ha...
asked by 16.06.2014 / 20:48
1
answer

EntityException when connecting to remote database

When connecting to the local bank, the application runs 100%. However, when I try to connect to the sql server remotely (on a nethost server), the application raises the following exception: Below is an error and a connectionstring.    add...
asked by 09.09.2014 / 02:02
1
answer

Property containing only the KeyAttribute attribute resulting in a self-incrementing column in the database

If I'm not mistaken, this must have come in version 6.1.1 of EntityFramework and it was not like that in previous versions. I believe that a column only became auto-increment when the DatabaseGenerated attribute was declared with the...
asked by 13.10.2014 / 21:53
0
answers

Add comment or column with entity framework core fluent api

How do I add a comment to a column. In sql I do this: ALTER TABLE Tabela MODIFY COLUMN 'nome' varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'Teste' AFTER 'nome'; What do I do in entity framework core fluent api?  ...
asked by 12.11.2018 / 15:24
2
answers

Group select and return exact quantity

Personal I'm using the entity and I have a query that returns some 2000 lines. After doing this: base.Get(queryParameters) .GroupBy(x => new { x.Id }) Until now it's normal, I work with pagedlist, where it is informed the number of the p...
asked by 21.08.2018 / 04:50
1
answer

Doubt generating entity from the cs file code in edmx C #

In the ".Net Framework 4" version I have a project that when using .edmx made the automatic generation of EdmSchema where in my project I did so: 1 - ADO - (Class Library Project) 2 - .edmx file 3 - An Interface using System; using Sy...
asked by 31.08.2018 / 04:09
1
answer

Error when querying large amount of data in the Entity framework,

I am putting together a report, and there is the option to query by date range. When I query with the interval of 30 or 60 days, I get the data, where I cluster and return. However, when you increase the query time, the same method returns th...
asked by 28.06.2018 / 21:16
0
answers

Persist data in related tables (1 x N)

I have these 2 related classes, and the requested class has a Collection of "OrderItems" ... The Order class: public class PedidoDTO { public int pedidoID { get; set; } public int codigo { get; set; } public Date...
asked by 18.08.2018 / 22:16