AddLookup() should execute within a transaction, since a LookupEntity could be inserted between the check and your insert.
The case-insensitive string compare is flawed on several fronts: (1) A .ToLower() compare will not work across all cultures. Instead use .ToUpperInvariant(). (2) Performing a case conversion is a performance bottleneck, since your code won't scale. Try running the compare on a million records containing large strings. Instead, perform a case-insensitive using string.Equals() with StringComparison.OrdinalIgnoreCase.
The value of _ResponseBase.Message depends on the order in which the instance's properties are set. This is a VBT. _ResponseBase should instead offer various constructors that set its different properties, all of which should have protected setters and public getters.
Exceptions should be thrown, not returned. The only exception (pun intended) to this rule is when the thrown exception cannot be relayed across the network (e.g. ASP .NET MVC server exception to JS client layer).
I need to develop an application x32 on Windows 7 64-bit (MS Visual Studio 2010 and .net 2.0 - .net 3.5) that uses an x32 usb driver to connect an industrial equipement with 3 NI 32x dll references to run on a 32-bit Windows 7 ebedded pc.
I have tryed to develop a simple test application on my WinXP 32-bit laptop (it old, slow and has a small screen), and it works very fine on the Windows 7 embedded pc.
If I run my application with Platform 64-bit and targetting x64 and using x64 dll references it is also all ok with all the external equipements connected, but obviously I cannot run this application on the Windows 7 embedded 32x.
My question is: Is it possible to develop the whole aplication on Windows 7 64-bit that uses the 32x NI dll references and output an aplication to test on this machine and to upload and run on Windows 7 embedded 32-bit? Maybe using DPInst ...
Open your project in VS, and double click the "Properties" branch in the Solution Explorer pane.
Select the "Build" tab on the left hand side, and change "Platform target" to "x86"
Rebuild your project - you may have to remove and re-add your references.
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 – ∞)
I have tried many times, changing Platform target to "x32" doesn't work and Microsoft says: "You need to install 64-bit drivers for all your hardware devices to get the correct functioning in a 64-bit version of Windows. Drivers designed for Windows versions 32-bit will not work on computers running 64-bit versions of Windows. ".