Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Unassigned: Remove unnecessary indirection from IEnumerable to array on ODL [1655]

$
0
0
Remove unnecessary indirection from IEnumerable<> to array on ODL

Sample:
```
private void CreateEntityTypeBody(EdmEntityType type, EntityTypeConfiguration config)
{
Contract.Assert(type != null);
Contract.Assert(config != null);

CreateStructuralTypeBody(type, config);
IEdmStructuralProperty[] keys = config.Keys.Select(p => type.DeclaredProperties.OfType<IEdmStructuralProperty>().First(dp => dp.Name == p.Name)).ToArray();
type.AddKeys(keys);
......
}
```
Replace
```
IEdmStructuralProperty[] keys = config.Keys.Select(p => type.DeclaredProperties.OfType<IEdmStructuralProperty>().First(dp => dp.Name == p.Name)).ToArray();
```
with
```
IEnumerable<IEdmStructuralProperty> keys = config.Keys.Select(p => type.DeclaredProperties.OfType<IEdmStructuralProperty>().First(dp => dp.Name == p.Name));
```

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>