Author Archives: WUDI

Typescript – tsc didn’t copy .html .css .txt to destination folder

tsc would translate .ts file to js and keep folder struction. however, for some special file for tsc, such as .txt, .html, .css, tsc command chooses to ignore them. we have to copy manually for cross-platform, we are using node.js … Continue reading

Posted in Typescript | Comments Off on Typescript – tsc didn’t copy .html .css .txt to destination folder

Orchard 2 – Microsoft open source CMS using asp.net core

Here we assume that %Orchard% is Orchard Source code workspace folder Orchard 2 uses autofac as DI library as well as NHibernate. %Orchard%\src\Orchard.Web\Global.asax.cs is entry of whole website. %Orchard%\src\Orchard.Web\Modules\Orchard.Setup\Views\Setup\Index.cshtml %Orchard%\src\Orchard.Web\Modules\Orchard.Setup\Controllers\SetupController.cs after filling at required field, ‘finish setup’ is clicked. it … Continue reading

Posted in Orchard | Comments Off on Orchard 2 – Microsoft open source CMS using asp.net core

Asp.net Core publish on Ubuntu

1. Download asp.net core sdk 2 from Microsoft website 2. link ‘dotnet’ command line to ‘/usr/bin/dotnet’ 3. publish project and zip all binary files including dlls, scp zip to ubuntu vps 4. export ASPNETCORE_URLS=”http://*:80″ This step is very important, because … Continue reading

Posted in Uncategorized | Comments Off on Asp.net Core publish on Ubuntu

.net core – create project and adding reference by command line only

dotnet new sln # new solution file mkdir webapi cd webapi dotnet new webapi # new project named webapi dotnet add package Autofac # try to add Autofac dotnet add package Autofac.Extensions.DependencyInjection dotnet add package MongoDB.Driver cd .. mkdir webapi_test … Continue reading

Posted in .net core | Comments Off on .net core – create project and adding reference by command line only

Code-First EntityFramework – step by step

This is first post for code-first entity framework and how to use it. 1. add entity framework, open project, in VS Package Management PM> Install-Package EntityFramework 2. Don’t enable migrations, if you enable migrations then, add Enable migrations only after … Continue reading

Posted in entityframework | Comments Off on Code-First EntityFramework – step by step

IIS subdomain configuration

1. open ‘IIS manager’ 2. right click on ‘site’ to create a new site 3.leave ip as ‘unsigned’, put all ‘host name’ to subdomain name for example ‘tool.wudilab.com’ 4. go to godaddy to add ‘core’ as subdomain

Posted in IIS | Comments Off on IIS subdomain configuration

WPF – simple wpf calculator

Here is example of WPF calculator, will add more function such as scientific calculator https://github.com/emacslisp/wpf/tree/dev/SimpleCalculator Visual Studio 2017 enhanced the symbols token searching function which originally VS2010 has and disappear in VS2013 and VS2015.

Posted in WPF | Comments Off on WPF – simple wpf calculator

Azure – creating app service talking with sql server

‘app service’ and ‘sql server’ are excellent combination for creating a small website. creating sql server on azure following step by step guide. Even on local visual studio, it talk with sql server on azure as well. 1. open microsoft … Continue reading

Posted in azure | Comments Off on Azure – creating app service talking with sql server

webapi – remove web api json string only

by default web api return is xml only. even return json string, but it is still embedded inside an xml file. for example: 1 2 3 <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> [{"Id":1,"Name":"Glenn Block"},{"Id":2,"Name":"Dan Roth"}] </string><string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> [{"Id":1,"Name":"Glenn Block"},{"Id":2,"Name":"Dan Roth"}] </string> in WebApiConfig.cs: 1 … Continue reading

Posted in Uncategorized | Comments Off on webapi – remove web api json string only

visual studio – how to format whole project files

formatting one single file is simple, find Edit.FormatDocument command in visual studio and click to apply for it. or Ctrl+K Ctrl+D. customizing C# indent, for example, going Tools | Options | Text Editor | C# | Tabs, on UI user … Continue reading

Posted in Uncategorized | Comments Off on visual studio – how to format whole project files