i have used Store Stored Procedure in my database (SQL Server)
select namebuffet,namefamilymember,idmember,Sum(finalpricefactorbuffet)-Sum((delivery*30)/100) as Price from Buffet_factorbuffet
Inner join Buffet_buffet
on idbuffet=buffetidfactor
Inner join Member_member
on idmember=memberid
inner join Buffet_banktransaction
on factorid=idfactorbuffet
where success=1 And checkout!=2 And datecheckouted is null
GROUP BY namebuffet,namefamilymember,idmember
Then i imported this in my WPF project with entity framework and also wrote my class like this
public class Buffetinformation
public List<Windows_BuffetInformation_Result> Getbuffetinformation ()
{
using (MYDBEntities DB = new MYDBEntities())
var q = DB.Windows_BuffetInformation().AsQueryable();
return q.ToList();
}
how can i bind some parts to datagridview controller using above class ,my stored procedure return some columns like (namebuffet,nameandfamilly,idmember and ....) but i want to use only namebuffet and idmember and show them in my datagridview or another controllers
i have seen some examples using ado.net but i cant find examples of entity framework
usingstatement. Without the curly braces ({ ... }) only the next line of code will be execute as inside it. Meaning that your Code right now wouldn't event compile as on the line with thereturnthe variableqis not declared