DbExpressionBuilder.Select<TProjection> Yöntem
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen giriş kümesi üzerinde belirtilen ifadeyi seçen yeni DbProjectExpression bir oluşturur.
public:
generic <typename TProjection>
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbProjectExpression ^ Select(System::Data::Common::CommandTrees::DbExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, TProjection> ^ projection);
public static System.Data.Common.CommandTrees.DbProjectExpression Select<TProjection> (this System.Data.Common.CommandTrees.DbExpression source, Func<System.Data.Common.CommandTrees.DbExpression,TProjection> projection);
static member Select : System.Data.Common.CommandTrees.DbExpression * Func<System.Data.Common.CommandTrees.DbExpression, 'Projection> -> System.Data.Common.CommandTrees.DbProjectExpression
<Extension()>
Public Function Select(Of TProjection) (source As DbExpression, projection As Func(Of DbExpression, TProjection)) As DbProjectExpression
- TProjection
yönteminin projection
sonuç türü.
- source
- DbExpression
Giriş kümesini belirten bir ifade.
- projection
- Func<DbExpression,TProjection>
Giriş kümesinin bir üyesine verilen öngörülen ifadenin nasıl türetileceğini belirten bir yöntem. Bu yöntem, Select ile uyumlu olan ve içine çözümlenebilen DbExpressionbir tür örneği üretmelidir. için TProjection
uyumluluk gereksinimleri açıklamalarda açıklanmıştır.
Seçme işlemini temsil eden yeni bir DbProjectExpression.
Select ile uyumlu olmak için, TProjection
türünden DbExpressiontüretilmiş veya DbExpression türetilmiş özelliklere sahip anonim bir tür olmalıdır. Aşağıda için TProjection
desteklenen tür örnekleri verilmiştir:
source.Select(x => x.Property("Name"))
TProjection
, DbPropertyExpression).
source.Select(x => new { Name = x.Property("Name") })
(TProjection
DbExpression türetilmiş özelliğine sahip anonim bir türdür).
Ürün | Sürümler |
---|---|
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: