Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
alaskanrogue
New Member

Edm Model Generation Fails

Using an Azure ASP.NET MVC API from a Maui app, I am encountering the following error in the app when attempting to access the API. A few days ago, the initalization was working properly. The cloud app has been under further development, but the base api code has not been modified, only the response from the endpoints. What elements are being sought? 

System.TypeInitializationException: The type initializer for 'GeneratedEdmModel' threw an exception.
 ---> System.InvalidOperationException: Sequence contains no elements
   at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at SentryCloud.Models.Container.GeneratedEdmModel.CreateXmlReader()

 

1 ACCEPTED SOLUTION
tayloramy
Super User
Super User

Hi @alaskanrogue

 

This does not appear to be Fabric related. I recommend asking in the .NET community for help with Maui apps: Category: .NET | Microsoft Community Hub

 

 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
nielsvdc
Super User
Super User

Hi @alaskanrogue,

 

The error message means that you are trying to run the GeneratedEdmModel.CreateXmlReader() function, but the result from API returns an empty result (Sequence contains no elements).

You need to validate that your result is not empty, before trying to read it into the XmlReader.

 

Hope this helps. If so, please give kudos 👍 and mark as Accepted Solution ✔️ to help others.

tayloramy
Super User
Super User

Hi @alaskanrogue

 

This does not appear to be Fabric related. I recommend asking in the .NET community for help with Maui apps: Category: .NET | Microsoft Community Hub

 

 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Proud to be a Super User!





Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.