Questions tagged as 'entity-framework'

1
answer

Inner join in tables 1 - n

I have two tables: Vehicle and Images, where a vehicle can have n images. When performing an inner join I get the following result: Vehicle1-Endereco picture Vehicle1-Endereco picture Vehicle2-Endereco picture Vehicle2-Endereco picture Vehicle2-...
asked by 10.09.2017 / 07:41
1
answer

Error inserting data with EntrityFramework C #

I have a very strange problem, I have 3 tables, being them, Countries, States and Cities, all of them are certainly configured the same, but it is giving error only when you enter data in the Cities table.    Classes: public class Paises :...
asked by 23.06.2017 / 01:16
1
answer

How to register a user with identity, with the data already inserted?

I have a method that inserts several data from an excel spreadsheet into the database, but there is some data, such as email, password, or concurrencyStamp (set to NULL), so I can not change user data by means of the code. [HttpPost] [...
asked by 22.05.2017 / 19:01
2
answers

Error in Update with EntityFramework

When I try to update an object in the database, I get the error,    Store update, insert, or delete statement   number of rows (0). Entities may have been modified or deleted since   groups were loaded. See    link for information on   under...
asked by 10.05.2017 / 02:28
1
answer

Table Relationship FluentAPI

I'm trying to make a table relationship, using FluentAPI with Entity Framework, in which my purpose are 3 entities: public class Empresa { public Empresa() { this.Gerentes = new HashSet<Gerente>(); } public int...
asked by 06.06.2017 / 17:03
1
answer

API C # - Update

I created an API using entity framework, the connection is ok, but when I update the data in the database, qlqr one of the fields, the Json in the API does not change. How to resolve this type of update?     
asked by 16.05.2017 / 20:50
1
answer

Why use MVVM in a WPF + EF + C # application

I've researched a number of forums and articles, and everyone says that the MVVM standard should be used when working with a project with EF + WPF. Can anyone tell me why this is so? because I want to implement a system but I do not know what...
asked by 31.03.2017 / 03:00
1
answer

Insert into 2 tables Entity framwork - 1 to 1

I have two entities generated by the code-first wizard: Person [Table("pessoa")] public partial class pessoa { public pessoa() { pessoa_endereco = new HashSet<pessoa_endereco>(); }...
asked by 10.06.2017 / 23:29
1
answer

Is it possible to instantiate a connection to the database manually using the Entity Framework?

I would like to manage my connections manually, so that users could enter the server address, but Entity creates the connection string directly in the config file, the only way would be to change that file every time. But I wanted to do this...
asked by 09.08.2017 / 00:21
1
answer

Filter with Linq or Lambda using Join and Group By

Good Afternoon In a table where it is always inserted new records can occur to have the same Date and the same RateCode, however I want to get a list of this table but for each Date group, RateCode would like me to return the last record inse...
asked by 11.05.2017 / 19:48