18 references to SingleOrDefault
System.ComponentModel.DataAnnotations (1)
DataAnnotations\ValidationAttributeStore.cs (1)
150
this.DisplayAttribute = attributes.OfType<DisplayAttribute>().
SingleOrDefault
();
System.Data.Entity (3)
System\Data\Metadata\Perspective.cs (2)
96
functionImport = entityContainer.FunctionImports.Where(fi => String.Equals(fi.Name, functionImportName, StringComparison.OrdinalIgnoreCase)).
SingleOrDefault
();
100
functionImport = entityContainer.FunctionImports.Where(fi => fi.Name == functionImportName).
SingleOrDefault
();
System\Data\Objects\ELinq\ObjectQueryProvider.cs (1)
211
return (sequence) => { return Enumerable.
SingleOrDefault
(sequence); };
System.Data.Linq (4)
ChangeTracker.cs (1)
506
this.AssignMember(this.current, am, ds.Cast<Object>().
SingleOrDefault
());
DataServices.cs (1)
597
target = ((IEnumerable)this.context.Provider.Execute(this.GetObjectQuery(type, keyValues)).ReturnValue).OfType<object>().
SingleOrDefault
();
Types.cs (2)
71
this.underlyingValue = Enumerable.
SingleOrDefault
(this.source);
109
this.entity = Enumerable.
SingleOrDefault
(src);
System.Data.Services.Client (6)
System\Data\Services\Client\ALinq\DataServiceQueryProvider.cs (1)
116
return query.AsEnumerable().
SingleOrDefault
();
System\Data\Services\Client\ALinq\ResourceSetExpression.cs (4)
163
return this.sequenceQueryOptions.OfType<FilterQueryOptionExpression>().
SingleOrDefault
();
172
get { return this.sequenceQueryOptions.OfType<OrderByQueryOptionExpression>().
SingleOrDefault
(); }
180
get { return this.sequenceQueryOptions.OfType<SkipQueryOptionExpression>().
SingleOrDefault
(); }
188
get { return this.sequenceQueryOptions.OfType<TakeQueryOptionExpression>().
SingleOrDefault
(); }
System\Data\Services\Client\ClientType.cs (1)
751
MimeTypePropertyAttribute attribute = (MimeTypePropertyAttribute)this.ElementType.GetCustomAttributes(typeof(MimeTypePropertyAttribute), true).
SingleOrDefault
();
System.Web (2)
ModelBinding\MutableObjectModelBinder.cs (2)
137
BindingBehaviorAttribute typeAttr = modelDescriptor.GetAttributes().OfType<BindingBehaviorAttribute>().
SingleOrDefault
();
140
BindingBehaviorAttribute propAttr = propertyDescriptor.Attributes.OfType<BindingBehaviorAttribute>().
SingleOrDefault
();
System.Web.DynamicData (1)
DynamicData\MetaModel.cs (1)
237
var tableNameAttribute = tableProvider.Attributes.OfType<TableNameAttribute>().
SingleOrDefault
();
System.Web.Entity (1)
System\Data\WebControls\EntityDataSourceUtil.cs (1)
812
.
SingleOrDefault
(); // metadata is supposed to ensure this is non-ambiguous