New Posts New Posts RSS Feed: Fatching Data To Multiple Database Table
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Fatching Data To Multiple Database Table

 Post Reply Post Reply
Author
AnupTrivedi View Drop Down
Newbie
Newbie
Avatar

Joined: 29-Mar-2011
Location: India
Posts: 2
Post Options Post Options   Quote AnupTrivedi Quote  Post ReplyReply Direct Link To This Post Topic: Fatching Data To Multiple Database Table
    Posted: 29-Mar-2011 at 5:45am
 Two table name is Contact_master and Vendore_master ,i am used join Query To get output the two table .Please Help Me.

Edited by AnupTrivedi - 29-Mar-2011 at 5:47am
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 29-Mar-2011 at 10:28am
Hi AnupTrivedi,
 
I believe what you are looking for is a projection.
i.e. (example against NorthwindIB)
 
[TestMethod]
public void TestProjection() {
  var mgr = new NorthwindIBEntities();
  var query = mgr.Customers.Where(c => c.Country == "USA")
    .Select(e => new { employee = e,
      orders = e.Orders.Where(o => o.OrderDate > new DateTime(1995, 1, 1))
    });
var results = query.Execute();
}
 
Regards,
   Silvio.
Back to Top
AnupTrivedi View Drop Down
Newbie
Newbie
Avatar

Joined: 29-Mar-2011
Location: India
Posts: 2
Post Options Post Options   Quote AnupTrivedi Quote  Post ReplyReply Direct Link To This Post Posted: 30-Mar-2011 at 4:26am
But Data Not Show In grid 
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 30-Mar-2011 at 9:06am
Hi AnupTrivedi,
 
Is this a Silverlight app? If yes, that's because anonymous types cannot be bound to the Silverlight DataGrid.
However, DevForce supports binding to anonymous types by using the DynamicTypeConverter (IdeaBlade.Core.DynamicTypeConverter)

i.e.
dataGrid1.ItemsSource = DynamicTypeConverter.Convert(args.Results);
If not, please be clear and provide detailed information on what exactly you are trying to accomplish.
 
Silvio.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down