sağlanmadı', 'parametresi bekler'. Ancak SQL Veritabanı bunları reddetmek gibi görünüyor,EntityFramework Yordam veya işlev 'ancak bu hatanın nedenini bulamıyorum, sadece temel bir soruyu soran için özür
ben bir saklı yordam yürütülecek Varlık Framework kullanıyorum ve ben dört parametrelerinde geçirerek. Beni doğru yöne yönlendiren var mı?
Kodum: SQL oluşturulan
Procedure or function 'SearchDirectoryEntries' expects parameter '@DirectoryId', which was not supplied.
geçerli:: hata üretir
ObjectResult<SearchDirectoryItem> resultList = container.ExecuteStoreQuery<SearchDirectoryItem>("SearchDirectoryEntries",
new SqlParameter("@DirectoryId", search.DirectoryId),
new SqlParameter("@Latitude", point.Latitude),
new SqlParameter("@Longitude", point.Longitude),
new SqlParameter("@Range", search.RangeMiles));
exec sp_executesql N'SearchDirectoryEntries',N'@DirectoryId int,@Latitude decimal(7,5),@Longitude decimal(6,5),@Range int',@DirectoryId=3,@Latitude=53.36993,@Longitude=-2.37013,@Range=10
saklanan prosedürleri geçerli:
ALTER PROCEDURE [dbo].[SearchDirectoryEntries]
@DirectoryId int,
@Latitude decimal(18, 6),
@Longitude decimal(18, 6),
@Range int
Çok teşekkürler. Sorgununuzdaki
Eğer SQL saklı yordam ilanını gönderebilir miyim? Parametrelerin tanımlandığı yere kadar mı? –
alter PROSEDÜR [Dbo]. [SearchDirectoryEntries] \t @DirectoryId int \t @Latitude ondalık (18, 6), \t @Longitude ondalık (18, 6), \t @range alkış int nelerdir – James
'arama' ve 'nokta' tanımları? yani 'search.DirectoryId' bir' int' midir? – ChrisF