(în curs de editare)
CREATE PROCEDURE [dbo].[GetCustomers] AS SELECT [ci].[CustomerID] AS [CustomerID], [c].[Title] AS [Title], [c].[FirstName] AS [FirstName], [c].[MiddleName] AS [MiddleName], [c].[LastName] AS [LastName], [c].[Suffix] AS [Suffix], [c].[CompanyName] AS [CompanyName], [c].[SalesPerson] AS [SalesPerson], [ci].[EmailAddress] AS [EmailAddress], [ci].[Phone] AS [Phone] FROM [dbo].[CustomerContactInfo] AS [ci] INNER JOIN [dbo].[Customer] AS [c] ON [ci].[CustomerID] = [c].[CustomerID]
PASUL 1 . La generarea entity model-ului se adaugă și procedura stocată dorită
PASUL 2. În panoul Entity Model se invocă meniul "Create Funtion Import"
PASUL 3. Se crează "funcția" importată
PASUL 4. Se folosește "funcția" în DAL
Se modifică linia 14 din
return aw.Customers.ToList();
după cum urmează:
PASUL 5. Verificare în SQL Profiler
exec [dbo].[GetCustomers]
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u
Enter your email address:
Delivered by FeedBurner