For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
config files - app.config or other file
of course, they can contain minimal info, like the connection to the database and have the rest of the config data stored as key:value pairs in a separate table
Then usually one or more helper programs - one to set up/maintain the config info (especially if all/some is encrypted), and a 'tray helper' program that displays status, allows control of the service etc
A service Im writing at the moment also has
a) an in memory database for statistics (in addition to using performance counters etc)
b) an in-built telnet & http server to inspect values (and maybe control some aspects of the service)
if you wanted to cut out writing the 'boilerplate' yourself, look at something like cinchoo http://cinchoo.com/category/application-host/?orderby=ID&order=ASC[^] - my only bugbear with it is its not open source - there are other 'service frameworks' out there iirc - while writing a service from scratch once is 'useful', the real work is the service 'tasks', so using a pre-built framework allows you to focus on that
In this way, I could have the process on server "CAT" run Services "Scratch" and "Purr", while the process on server "DOG" could run Services "Wag" and "Bark" and moving Services from one server to another was simple. All servers had exactly the same code deployed.
One thing to be aware of. You're doing a case sensitive comparison of a string there. What happens if the case doesn't match what you're testing for (hint, you won't trigger any of your enable conditions)?
i have a problem for making rfid program with socket in c#.
i try this code :
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
IPAddress ip = Dns.GetHostAddresses(ipLoc);
IPEndPoint ep = new IPEndPoint(ip,23);
We are now in the planning stage of the next web based project using C#, MVC 5 and Entity framework 6. We are discussing about framing the project using the Repository pattern. We already have the full database ready. So, it is going to be Database first.
Now, my question : Is it feasible / worth using Repository pattern with database first approach? I got this doubt because, many sources and examples found in internet are Code first approach. If it is possible can you please provide me any advice or online/article sources to refer. Thanks.
I welcome any ideas or suggestions on Repository pattern.
As Pete O'Hanlon said, you can. We use the Repository pattern + Unit of Work on the project I'm on right now. While we do use Code First, there is no reason it can't apply to Database First as well. Someone can correct me if I'm wrong, but I don't think the purpose of the Repository pattern was designed specifically for Code First. One advantage of using Repo is testing, another is dependency injection. It's simple to test using a Repository, from what I can tell here.
How do I compare two tables and get the difference?
Dim dtBenefitsCurrent As New DataTable
dtBenefitsCurrent = objDB.GetPlanBenefits(groupID, planID, SequenceNumber)
Dim dtBenefitsPreviousYear As New DataTable
dtBenefitsPreviousYear = objDB.GetPlanBenefits(PreviousgroupID, PreviousplanID, PreviousSequenceNumber)
Dim dyDifference ????
I just notices most of the blogs I used to follow are no more updated by they creator.
What are the good .NET / C# / Application Lifecycle blogs with RSS feed of this moment. I prefer to follow people than organizations. I like blogger that write one article, news or tutorial by weak or month.
Whilst prototyping a console app the other day, it stuck me that the dynamically linked library seemed somewhat redundant in .NET and that was nothing I could do with one that could not be achieved by creating an executable. I can add a reference and reuse publically declared types whilst with both. But an executable has some obvious benefits, yet I've always created DLLs because I've been told 'it's best practice' or just followed other's examples.
Can anyone think of a technical reason why you'd choose to build a library over an executable? Is a DLL an artefact simply for some legacy backwards compatibility that I'm unaware of?