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

Edited Issue: The enum type member is not generated by ODataConventionModelBuilder if the enum type is used by an action. [1642]

$
0
0
Build an EdmModel thougth below code:

ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
EntitySetConfiguration<Employee> employees = builder.EntitySet<Employee>("Employees");
var employee = employees.EntityType;

var actionConfiguration = employee.Action("AddSkill");
actionConfiguration.Parameter<Skill>("skill");
actionConfiguration.ReturnsCollection<Skill>();

return builder.GetEdmModel();

The generated csdl is:
<EnumType Name="Skill" />

but if deleting the 3 lines of adding Action, then the csdl is:
<EnumType Name="Skill">
<Member Name="CSharp" Value="0" />
<Member Name="Sql" Value="1" />
<Member Name="Web" Value="2" />
</EnumType>

Viewing all articles
Browse latest Browse all 7215

Trending Articles



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