dbContext dc = new dbContext (); IEnumerable <SocialMedia> list = dc.SocialMedias.Where(p => p.Name.StartsWith("T")); list = list.Take<SocialMedia>(1); </SocialMedia>
SELECT [t0].[ID], [t0].[Name] FROM [SocialMedia] AS [t0] WHERE [t0].[Name] LIKE @p0
dbContext dc = new dbContext (); IQueryable<SocialMedia> list = dc.SocialMedias.Where(p => p.Name.StartsWith("T")); list = list.Take<SocialMedia>(1);
SELECT top 1 [t0].[ID], [t0].[Name] FROM [SocialMedia] AS [t0] WHERE [t0].[Name] LIKE @p0
以上是C# 中 IEnumerable 和 IQueryable 有什么区别?的详细内容。更多信息请关注PHP中文网其他相关文章!