ccook

Stories submitted by ccook

Simple method to constrain stored procedures by a collection(www.charlesrcook.com)

submitted by ccookccook(320) 1 month, 1 day ago

Passing a collection of ID's to filter a SQL query within a stored procedure is not natively supported. Consider this article which discusses methods for passing arrays into a stored procedure. Constraining a stored procedure's query has a simple work around, however. Passing the ID collection as a comma deliminated string allows the query to use LIKE to constrain the results. Note that the preceding and trailing commas are necessary. An example demonstrates how to do this easily. read more...

add a comment |category: |Views: 8

tags: another

Undo Within Selected(charlesrcook.com)

submitted by ccookccook(320) 2 years, 11 months ago

Today I was working on some code, nothing particularly different than any other day. I did something I have done thousands of times before, made some changes, and then needed to get previous code back. This was quickly done with undo several times, copy to clip board, redo several more and then paste. Then it hit me, why don't we have an undo within selected text? We have a search and replace within selection. Undo within selection complements the search and replace really well, and further, allows for quicker retrieval of code several edits ago. Particularly when the change was a single iteration ago in a particular location… In a sense spatial undo versus temporal undo. Hopefully this will make it into Visual Studio some day, either as a power tool or third party plug-in. read more...

add a comment |category: |Views: 3

tags: another

Unifico Load Tested with and without WCF Remoting(charlesrcook.com)

submitted by ccookccook(320) 3 years, 4 months ago

This is rather exciting to me; I just ran a few load tests on Unifico with and without remoting the services with WCF bindings. I knew the application could remote. The concern was how efficient. I created a quick web test that simply goes through the admin, lists the admin lists, performs a filter, edits and saves an item, then logs out. Roughly every action was hit (eh, it's a spike :)). I then setup the bindings and ran a load test remotely and locally (remotely being hosted on 127.0.0.1). read more...

add a comment |category: |Views: 8

tags: another

Using a Recursive Expression to Create an Html Menu(charlesrcook.com)

submitted by ccookccook(320) 3 years, 4 months ago

I find recursive expression to be really useful. They are particularly handy when dealing with parent child relationships. As a demonstration, see a potential method for generating a site map below: read more...

add a comment |category: |Views: 38

tags: another

Drag-and-drop sorting for our ASP.NET MVC list editor (in one line of (blog.codeville.net)

submitted by ccookccook(320) 3 years, 4 months ago

So you can use ASP.NET MVC’s model binding conventions to implement a list editor where the user can dynamically add and remove items. Great! But how can you let the user control the order of the items? For example, when editing a list of actors in movie, the user might want to move the most famous actor up to the top of the list. read more...

add a comment |category: |Views: 90

tags: another

c# : How to set default value on automatic properties (auto implemente(predicatet.blogspot.com)

submitted by ccookccook(320) 3 years, 4 months ago

The new c# compiler allow us to write very clean and simplified property declaration, that avoid us to declare the private member and the get/ set accessors. here is the snippet (just do "prop TAB TAB" in visual studio 2008) Here is what to do when you need a default value for your property : Just use our good old attributes: read more...

add a comment |category: |Views: 142

tags: another

Allowing for Dynamic Embedded View Substitution with MVC(charlesrcook.com)

submitted by ccookccook(320) 3 years, 4 months ago

On ignoring embedded views within a class library when a view is within the Views folder. read more...

add a comment |category: |Views: 15

tags: another

Paging Helpers in Unifico, Filtered and Sorted Paging(charlesrcook.com)

submitted by ccookccook(320) 3 years, 4 months ago

Unifico has a few paging helpers to make service methods easily paged from a client. Essentially the framework makes consuming a page request object as simple as calling .ToList() on an IQueryable source. The object, the PageRequest, has two collections, Filters and Sorts with several constructors to make instantiation easy. The collections are rather straight forward, providing filtering and sorting ability on a paging source. The uniqueness comes from the ability to request multiple filters and sorts together, along with a paging request. This request is then execute on the IQueryable source, so if DLINQ is used, results in exactly two database hits. A COUNT statement is executed to find out how many pages there are, and a single select statement providing the paged results. This is all done without exposing LINQ or IQueryable to the service's client. read more...

add a comment |category: |Views: 8

tags: another

CopySourceAsHtml (CSAH)(jtleigh.com)

submitted by ccookccook(320) 3 years, 4 months ago

CopySourceAsHtml is an add-in for Microsoft Visual Studio 2008 that allows you to copy source code, syntax highlighting, and line numbers as HTML. CSAH uses Visual Studio's syntax highlighting and font and color settings automatically. If Visual Studio can highlight it, CSAH can copy it, and your source should look the same in your browser as it does in your editor. read more...

add a comment |category: |Views: 6

tags: another

Adding HTTPS/SSL support to ASP.NET MVC routing(blog.codeville.net)

submitted by ccookccook(320) 3 years, 5 months ago

Unfortunately, as of Preview 4, routing has a missing feature (oh noes!): it’s got no support for absolute URLs. Everything it does works in terms of application-relative “virtual paths“, so you simply can’t generate links to other subdomains, port numbers, or even switch from HTTP to HTTPS (or vice-versa). As they say, the design is never perfect first time. read more...

add a comment |category: |Views: 104

tags: another

Ideas for Content Management in ASP.NET MVC(wynia.org)

submitted by ccookccook(320) 3 years, 6 months ago

I've been working on quite a few projects where I'm either already directly developing within the ASP.NET MVC Framework or where the framework is prominently featured in my design/architecture documents. Because the framework is so new, there are still a few kinks and the patterns for how to do some common things haven't yet sorted themselves out. One of those areas is how to handle content in web applications. read more...

add a comment |category: |Views: 15

tags: another

Visual Studio 2010 and .NET Framework 4.0 Overview(msdn.microsoft.com)

submitted by ccookccook(320) 3 years, 7 months ago

Visual Studio 2010 and the .NET Framework 4.0 mark the next generation of developer tools from Microsoft. Designed to address the latest needs of developers, Visual Studio and the .NET Framework deliver key innovations in the following pillars: read more...

add a comment |category: |Views: 32

tags: another

Regular Expressions In MS SQL Server using CLR(anastasiosyal.com)

submitted by ccookccook(320) 3 years, 7 months ago

In this post I'll show just how easy it is to make your SQL Server 2005 database support Regular Expressions through what is known as SQL CLR read more...

add a comment |category: |Views: 18

tags: another

How to Create a Reusable WCF Service Host for Windows Services and ...(blogs.msdn.com)

submitted by ccookccook(320) 3 years, 8 months ago

In this article, I'll show you how to create a reusable service host that can be run from either from the console (self-hosted) or installed as a Windows service. I'll also demonstrate how to use a configuration file instead of code to control which WCF services the host starts. Finally, I'll show how you can make the Windows service installer flexible to allow you to run multiple versions of the service on the same machine. Before getting into implementation details, I'd like to share my motivations behind this solution. read more...

add a comment |category: |Views: 73

tags: another

.NET StockTrader Sample Application(msdn.microsoft.com)

submitted by ccookccook(320) 3 years, 10 months ago

An End-to-End Sample Application Illustrating Windows Communication Foundation and .NET Enterprise Technologies This application is an end-to-end sample application for .NET Enterprise Application Server technologies. It is a service-oriented application based on Windows Communication Foundation (.NET 3.0) and ASP.NET, and illustrates many of the .NET enterprise development technologies for building highly scalable, rich "enterprise-connected" applications. It is designed as a benchmark kit to illustrate alternative technologies within .NET and their relative performance. read more...

add a comment |category: |Views: 58

tags: another

Forgot that connection string?(connectionstrings.com)

submitted by ccookccook(320) 3 years, 10 months ago

Provides connection strings to many databases by many methods. An essential reference. read more...

9 comments |category: |Views: 315

tags: another