Tuesday, February 4, 2014

"Update Model from Database" does not update column type

Due to spec changes, I need to change column type from nvarchar(500) to nvarchar(2000)

In the EF, when I try "Update Model from Database", the property still says "length:500".

To update the type of existing column, you can
1) delete entity from model and re-add it back, this is not ideal when you have navigation properties, :(
2) or use some third party tools, ie dbmltools

The reason why column type did not get updated, is because
Explanation from MSDN
The ADO.NET Entity Data Model Designer (Entity Designer) uses the Update Model Wizard to update an .edmx file from changes made to the database. The Update Model Wizard overwrites the storage model as part of this process. The Update Model Wizard also makes some changes to the conceptual model and mappings, but it only makes these changes when objects are added to the database. For example, new entity types are added to the conceptual model when tables are added to the database, and new properties are added to entity types when columns are added to a table. For details about what changes are made to the .edmx file, see Changes Made to an .edmx File by the Update Model Wizard.

for more info, see stack overflow link

Saturday, January 18, 2014

Easy way to set up custom domain for Blogger on GoDaddy

While trying to find out how to set up custom domain for Blogger. I found this link showing step by step instruction, which I think it is really useful.

Step 1: In this article, it mentioned a tool which can help you set it up quickly. After enter your own domain, once click confirm, DNS will be set it up automatically for Blogger.
http://nz.godaddy.com/blog/bloggerdnssetup.aspx?isc=bb2470


Step 2: Last step, Blogger will give you two CNAMEs to enter on GoDaddy, one is a common one (Name:www, Destination: ghs.google.com), another one is for your blog only. Previous tool will set up the common one on Godaddy, all you need to do just the second one as following. Then submit zone file on the top right.



Step 3: Don't forget to set up your custom domain on Blogger. Setting=>Basic=>Publishing=>Edit


Done! After an hour or so, enter your custom domain, it will redirect to your Blogger's blog.

happy blogging...

hello there

hello there