In future, please try to do at least basic research yourself, and not waste your time or ours.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
What is the purpose of a .edmx file? It is a XML formatted file in Visual Studio. It has database table information. But how is it used in a Visual Studio C# asp.net web app?
Online search engines say that "an .edmx file is an XML file that defines a conceptual model, a storage model, and the mapping between these models. An .edmx file also contains information that is used by the ADO.NET Entity Data Model Designer (Entity Designer) to render a model graphically."
It's a file that is used by the Entity Framework. That is an ORM (Object Relational Mapping) Framework. To access a database without the need to manually write SQL queries and the like. They exist to make the life of a development (hopefully) easier.
Those files are generated from the designer integrated in Visual Studio but you can also manually edit them if you like. There will/should also be some autogenerated .Net Code which then provide access to the data model defined in those edmx files.
I'm curious why you need to constantly get feature information from a HID device since the feature set of a device should be static and fetching it once in response to a connection event I would think would be sufficient. However, it's not for me to judge...
If the function doesn't support async there is no way to make it act that way without implementing some sort of polling. Unlike making an async call synchronous, there is no 'await' for functions that don't use a callback and immediately return.
That being said, it isn't too hard to implement your own. Setting up a background worker or some other threading solution (even a system.threading.timer can be used) so you check at a given interval is very common. It used to be used a lot with serial comms to check the input buffer. The only gotcha is to make sure you have an abort so your app doesn't hang at close. If you use a timer with a polling interval it will automatically abort when your app shuts down. Also, make sure you handle the cross-thread marshal if anything is going up to the UI.
What about polling in a different thread and adding a custom event when data are available? With the current multi-core computers, that should help to remove load from the main (UI) thread of the application. Beware of Control.Invoke/BeginInvoke when you then update the UI on data received from the device.
I'm trying to build a SOAP message from scratch in C# for a webservice-consuming application. The WSDL provided for the service specifies using as a paramter to a particular method a class generated by the WSDL that includes roughly 70 different properties. When such a class is returned as the result of a method on this webservice, the proxy has no trouble moving the data from the SOAP message into this class, regardless of whether all 70 properties are present or not. Those missing fields are represented in the incoming message as self-closing tags. However, when the proxy generates a SOAP message *to* the webservice using this class, generating self-closing tags for empty fields, the webservice rejects the call. It's only when it's presented with non-empty tags--and at that, not all of the properties, if they contain a value, will be accepted--will it accept the message.
About 6 months ago I figured out how to create the message from scratch in C#, using the HttpWebRequest/Response classes (I think so, anyway), but since then I've lost those code files and can't figure out how I did it. Does anybody have an example of how to do it? Or, even better, any suggestions about what I can do to force the proxy to ignore empty properties when creating the SOAP message?
Last Visit: 31-Dec-99 18:00 Last Update: 10-Mar-14 18:46