- 博客(7)
- 资源 (2)
- 收藏
- 关注
原创 Azure Website - UTC Time and Local Time
Key: Azure Website uses UTC time on the serverHow to: show local time in website UI?Solution:#1 Use TimeZoneInfo to convert UTC to local timevar cetZone = TimeZoneInfo.FindSystemTimeZoneById("Central
2015-11-24 17:39:44 2188
原创 LINK - EF6 Update/Insert/Delete model object from outside of DbContext
LINK - https://msdn.microsoft.com/en-us/data/jj592676.aspxpublic void InsertOrUpdate(Blog blog) { using (var context = new BloggingContext()) { context.Entry(blog).State = blog.BlogId
2015-11-24 11:16:58 2668
原创 LINK - About Cache Control of Azure Blob Files
Set cache control correctly will save bandwidth of blob access then save money!LINK 1 - http://social.technet.microsoft.com/wiki/contents/articles/25528.azure-blob-storage-and-effective-use-of-cache-c
2015-11-23 19:39:00 1516
原创 ASP.NET MVC - loop model data in javascript
Key: razor syntax using @: before the js variable in c# code blockExample: var chartData = []; @for(int i=0; i < Model.ModuleDetails.Count; i++) { @: chartData.push(@Html.
2015-11-20 20:23:22 1707
原创 EF6 Database First (DbContext) - Change Schema at runtime
Problem:There are two SQL databases (dev and live) with on Azure which has identical table structures but different table schema name. We need a way to change the schema name at runtime thus we can ma
2015-11-19 20:22:49 2793
原创 ASP.NET MVC - Display UTC time from server as local time on client side
View html:span class="utcdatetime">@user.MostRecentTestDate.Value.ToString("M/dd/yyyy hh:mm tt UTC")span>View js:(needs reference to jquery.formatDateTime.js from https://github.com/agschwender/jquery
2015-11-11 21:01:59 1701
原创 asp.net MVC: PagedList + View Model
To pass view model with PagedList:1. Controller action must use HttpGet and use View Model as action parameterpublic ActionResult Index(UserIndexModel model)2. In the action return the view model with
2015-11-10 19:18:07 2241
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人