The project I am currently working on is a sizable line-of-business desktop program written using the WPF framework; a framework I particularly like working with due to its extensibility and ease of design (via XAML).One of the powerful parts of WPF is the ICommand system for binding buttons to ViewModel methods; I won't go into the details of it here as it deserves an article of its own. However one of its basic functions is the ability to pass a parameter from the UI back to the ViewModel's ICommand property, such as the selected item in a data table.…
All posts in “c#”
I have been asked the question "Can you pass an enumerable to a procedure?" or "How do you pass a table to a stored procedure" several times in the past. The simple answer is "yes", the slightly more complex answer is "yes, and this is how"!How to pass an Enumerable to a SQL Stored Procedure in .NETAlthough my example code here is in C# the same process applies to other .NET languages.You can indeed pass an enumerable object to your Stored Procedure by using a special type of SQL object called a "User Defined Table Type". UDTTs can…
Path.Combine does not properly concatenate filenames that start with Path.DirectorySeparatorChar because it sucks. Pathy.Combine is my solution.…