Questions tagged as 'entity-framework'

1
answer

Do not update a certain EF field asp.net mvc

I have a table that every time I create a new register has the field Datacadastro, but when I want to edit I do not want to change the date that was registered and only changes the other fields. I already tried to do it in a way by logic works b...
asked by 09.02.2018 / 21:35
1
answer

Include optional Entity Framework

I have a big question here with regards to Include of the Entity Framework. var ocorrencias = db.Ocorrencia .Include("Pessoa") .Where(c => c.Id > 1000).ToList(); I used Include because I need the object...
asked by 22.03.2017 / 01:26
2
answers

How to insert a where inside a linq query

I have the following query : var result = (from line in db.ApadrinhamentoListas group new { line } by new { line.datahora, line.valor_doacao } into grp select new { DataHora = grp.Key.datahora, Valor = grp.Key.v...
asked by 29.11.2017 / 21:11
2
answers

DropdownList with BeginCollectionItem

Good Night! I could follow in this same question here
asked by 01.05.2017 / 02:49
1
answer

error Migrations C # MVC

I created a Financial Controller, but when I click on the menu to list it returns the error:    Invalid object name 'dbo.Movimentacaos'. Why did you get this name? It was meant to be Movimentacoes . PS: I already added in my cont...
asked by 15.06.2016 / 05:00
1
answer

Doubt with join between two classes

I have the Classes: class Procedimento { public string CodProcedimento { get; set; } public string NomeProcedimento { get; set; } public string TpSexo { get; set; } public int IdadeMinima { get; set; }...
asked by 30.01.2017 / 20:02
2
answers

NOT IN in linq using a subquery

I'm using the answer as the basis on: link I need to make a query where it does not contain (NOT IN) the Ids coming from another query. The SQL Query is this: SELECT DISTINCT tbl_boleto.int_IDC, tbl_Admin.* //redução do código FROM...
asked by 08.03.2016 / 16:45
1
answer

Location and maps [closed]

Hello, I'm going to work on an application that will have to work with location and maps, basically the user will inform an address and it will appear to him nearby places, so I wanted to know + - the way of the stones for this, I was thinking ab...
asked by 03.01.2016 / 16:51
2
answers

Search in the Entity Framework as case sensitive

I am using Entity Framework 6, MySQL, ASP.NET MVC. The problem is this: when I search the form (my search view), the EF is differentiating capital from lowercase. When I query directly in MySQL, using SqlYog for example, it does not make any...
asked by 25.06.2016 / 15:56
1
answer

1: N Fluent API Mapping Cascade

How to model a 1: N relationship, where 1 user can have multiple requests, and in this request we have reference to another entity ? Ex: public class Usuario { public int UsuarioId { get; set; } public string Name {get; set; }...
asked by 21.06.2016 / 23:21