2

i have a query like this:

            var qHead = from x in context.anag_commessa1
                        join a in context.abe
                        on x.comcli equals a.abecod
                        where x.comcommtip == ward && x.comdatcon == delivery
                        orderby x.comprog descending
                        select new OrderHead
                        {
                            society = x.comsoci,
                            year = x.comanno,
                            letter = x.comlett,
                            order = x.comprog,
                            delivery = x.comdatcon,
                            customer_id = x.comcli,
                            customer_description = a.abers1,
                            destination = x.comdestin,
                            note = context.anag_commessa1_note.Where(o => o.ComSoci == x.comsoci && o.ComAnno == x.comanno && o.ComLett == x.comlett && o.ComProg == x.comprog).Select(o=>o.ComNote).FirstOrDefault() ?? ""
                        };

if i execute with entity framework provider it work, with Npgsql return me an error, The method or operation is not implemented

Berry
  • 61
  • 7
  • I don't believe EF supports `Npgsql`. Generally when using PostgreSQL, I use NHibernate. – Jeremy Holovacs Jan 30 '14 at 14:36
  • Have you followed the steps mentioned here [Entity framework PostgreSQL](http://stackoverflow.com/questions/1211475/entity-framework-postgresql)? – Trevor Pilley Jan 30 '14 at 14:49
  • Sure, it work if i remove the last select, note = context.anag_commessa1_note.Where(o => o.ComSoci == x.comsoci && o.ComAnno == x.comanno && o.ComLett == x.comlett && o.ComProg == x.comprog).Select(o=>o.ComNote).FirstOrDefault() ?? "" – Berry Jan 30 '14 at 15:02

0 Answers0