Questions tagged as 'entity-framework'

2
answers

Optimize operation with lambda

I have the following classes: public class Pedidos_Itens { public int ID { get; set; } public int Qtde { get; set; } public Pedidos _Pedido { get; set; } public int Pedido { get; set; } public Loja_Produtos _Produto; pu...
asked by 11.06.2014 / 14:09
2
answers

Expression yields no result, but there is data

This is my query in direct sql. select c.de_cnpj, c.DT_TransacaoV from T_CRM_StatusPDV c join T_PDV p on c.DE_CNPJ = p.CNPJ where DATEDIFF(DAY,c.DT_TransacaoV,GETDATE()) > 45 This is my lambda expression, which in my view corresponds to...
asked by 06.06.2014 / 22:13
1
answer

Calculate date difference and compare with integer field in lambda expression

I have a date field (DateTime) and also a field of type integer. I need to make the difference between this date field and today's date (DateTime.Now) and compare if it is larger or smaller than my integer field. I made and gives this error. O...
asked by 05.06.2014 / 21:03
1
answer

How to block editing of a record when it is being edited by another user C #

On a networked system (several using the same database), how do I know if a user is already editing the registry. For if in the case two computers edit the same record at the same time, a problem occurs because only the changes of the last user...
asked by 10.02.2015 / 23:07
2
answers

Calling action with AJAX, but does not return alert for view

In textbox Ticket , in event onChange() I call AJAX below: $('#Ticket').on('change', function () { var tkt = this.value; $.ajax({ url: '@Url.Action("VerificaTicket", "Oc")', data: { 'tkt': tkt }...
asked by 03.03.2014 / 17:55
2
answers

Mapping a Listlong in LINQ to SQL - Windows Phone 7.1

Problem I'm starting an application for Windows Phone 7.1, and I'm implementing the database, but I came across a situation that I did not find any similar situation to try to solve, and I also did not find anything to help me with the docu...
asked by 17.10.2014 / 04:38
2
answers

Generate model-based migration (Entity Framework)

I'm trying to generate a migration based on a model: [Key] public int Id { get; set; } [MaxLength(100)] public string NomeInstituicao_Fundamental { get; set; } public string AnoInicio_Fundamental { get; set; } public stri...
asked by 25.09.2018 / 20:18
1
answer

Update version of the Entity framework

I just updated my version of .Net 3.5 to 4.5.1. My Entity Framework was in version 3.5, I was wondering if it already updates to the newer version after the framework switch.     
asked by 02.10.2014 / 16:34
1
answer

Error when simulating distinc in query with Linq and lambda expression

I have 2 tables in a SqlServer database. One call to another and another. I'm trying to return all states of the tbState table that have at least one city (tbCity) and with the properties tbCity.bnlActivityCity and tbCity.blnExibirNoPortal = tru...
asked by 10.01.2018 / 18:34
1
answer

Doubt about which Inheritance to use in the Entity Framework

I just had the opportunity to use EF basically 1x. So, I have a lot of doubts, even though I'm consulting quite a bit with google. I have a client application that will pick up various Facebook data from the logged in user ... Playing in Json...
asked by 08.11.2017 / 01:11