Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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()
Solved! Go to Solution.
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
Proud to be a 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.
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
Proud to be a Super User! | |
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.