This example shows how to format DateTime using String.Format method. All formatting can be done also using DateTime.ToString method. Custom DateTime Formatting There are following custom format specifiers y (year), M (month), d (day), h (hour 12), H (hour 24), m (minute), s (second), f (second fraction), F (second fraction, trailing… Read more “String Format for DateTime [C#]”
Month: October 2012
What is NoSQL, and why do you need it?
Summary: NoSQL is a whole new way of thinking about a database. Though NoSQL is not a relational database, the reality is that a relational database model may… Read more “What is NoSQL, and why do you need it?”
Linq to SQL DataContext Lifetime Management
Get some good information there: http://www.west-wind.com/weblog/posts/2008/Feb/05/Linq-to-SQL-DataContext-Lifetime-Management
SEO Redirecting URLs to lowercase excluding static files
As you may know Google treats different cased URLs as different URL entirely. If they find both cases they will judge this as duplicate content so it… Read more “SEO Redirecting URLs to lowercase excluding static files”
How to update a detached entity in Entity Framework
If you are using Entity Framework and closing or disposing of your DataContexts (read database connections) as soon as your Linq to Entities query have finished, which… Read more “How to update a detached entity in Entity Framework”
How to delete an entity by ID in Entity Framework
It may seem unnatural to delete Entities in Entity Framework. In the days of stored procedures I used to just pass an ID where as now you… Read more “How to delete an entity by ID in Entity Framework”
WCF REST: How to get an IP address of a request
It seems to be quite difficult to find the IP of the request when in the Context of a WCF REST service. I found you can do… Read more “WCF REST: How to get an IP address of a request”
WCF REST: How to get the requested URL
Finding the Request.Url is a lot different from standard web work when working in a WCF REST context. It can be quite difficult to find the URL… Read more “WCF REST: How to get the requested URL”