I have 3 tables; I write a stored procedure in ADO.NET Entity Framework.
ALTER PROCEDURE [dbo].[sp_GetDepartmanData]
(@departman nvarchar(50))
BEGIN
SELECT
d.ID, d.Name as DepartmanName,
sb.Salary, sb.email,
sp.Name, sp.SurName, sp.Phone, sp.Married, sp.Address
FROM
Departman d
INNER JOIN StaffsBusiness sb ON d.ID = sb.StaffsPersonelDepartmanID
INNER JOIN StaffsPersonel sp ON sb.StaffsPersonelID = sp.ID
WHERE
d.Name = @departman
END
I need a stored procedure function I write below:
var staffPersonel = staffContext.GetPersonelInformationWithDepartmanID("Yazılım");
gvPersonel.DataSource = staffPersonel;
gvPersonel.DataBind();
GetPersonelInformationWithDepartmanID function I write from SQL (user defined function in ADO.NET Entity Framework) there are 3 alternative (it is silly!!!) but i have 3 joininig table!!!. How can i use if i join 3 table before?