c# - SQL multiple results with entity -
i want merge result of 2 sql select statements one.
here sample :
// class public class _product { public long productid { get; set; } public string description { get; set; } } public class _company { public long companyid { get; set; } public int posotion{ get; set; } } // c# entity void runqyery() { string multiquery = "select productid, description product;"+ " select companyid, posotion company;"; _product objpro = new _product(); _company objcom = new _company(); // right? should now? var result = _entities.database.executesqlcommand(multiquery); objpro = ... objcom = ... }
how can finish code? there way read select on 1 trying?
thanks attention
Comments
Post a Comment