Monday, December 29, 2014
Tuesday, December 2, 2014
localdb tips
SQL CLR is disabled by default, to enable:
using master
select * from sys.configurations where name = 'show advanced options'
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'clr enabled', 1;
GO
RECONFIGURE;
GO
select * from sys.configurations where name = 'show advanced options'
Create new localdb instance
sqllocaldb.exe create "Dev" 11.0 -s
This creates a localdb instance named Dev using the VStudio 2013 binaries and starts it.
Create new database when getting "file already exists" errlr
-- open new query window against master db:
CREATE DATABASE CLFM ON (NAME = 'CLFM', FILENAME = 'C:\Users\vafsctonnet\UTest\CLFM.mdf')
LOG ON (NAME = 'CLFM_log', FILENAME = 'C:\Users\vafsctonnet\UTest\CLFM.ldf')
Efficient way to programmatically create localdb
http://www.jefclaes.be/2014/10/programmatically-force-create-new.html
Command line commands
from VStudio CMD:
get info on all db's on machine
SqlLocalDB.exe info
info on one db
SqlLocalDB.exe info UTest
SqlLocalDB.exe stop UTest
SqlLocalDB.exe start UTest
Make a copy of an existing database
Make copies of the .ldf and .mdf files.
Then in server, right click Databases folder and select Attach. Select .mdf file. Done.
Monday, December 1, 2014
OO vs FP
The bottom, bottom line here is simply this. OO programming is good, when you know what it is. Functional programming is good when you know what it is. And functional OO programming is also good once you know what it is.
http://blog.cleancoder.com/uncle-bob/2014/11/24/FPvsOO.html
http://blog.cleancoder.com/uncle-bob/2014/11/24/FPvsOO.html
The Hacker Way - Facebook
Article
“Done is better than perfect”.
“Code wins arguments.”
“The riskiest thing is to take no risks.”
“Move fast and break things.” The idea is that if you never break anything, you’re probably not moving fast enough.
“Done is better than perfect”.
“Code wins arguments.”
“The riskiest thing is to take no risks.”
“Move fast and break things.” The idea is that if you never break anything, you’re probably not moving fast enough.
Monday, November 10, 2014
Sunday, November 9, 2014
ORMS - You're Doing It Wrong (Jimmy Bogard, Oredev conf)
Vimeo Video from OroDev conference
27:34 - use query/command instead of repositories
19:05 - use Project to limit number of columns, automatically create joins and avoid ORM tracking for reads
14:00 - includes (eager fetching)
34:45 - use Glimpse to see the sql
38:00 - EF unit of work pattern for MVC controller
39:30 - wrong way to use DbContext in MVC controller, use a context instance per controller instance.
27:34 - use query/command instead of repositories
19:05 - use Project to limit number of columns, automatically create joins and avoid ORM tracking for reads
14:00 - includes (eager fetching)
34:45 - use Glimpse to see the sql
38:00 - EF unit of work pattern for MVC controller
39:30 - wrong way to use DbContext in MVC controller, use a context instance per controller instance.
Saturday, November 8, 2014
TFS Release Management
Downloading Windows Azure Subscription Files (scroll down to VStudio method)
Pre-configured VM for TFS 2013 and Release Management (and everything else)
Rollbacks explained.
RM System Variables (standard templates)
Build Directory $(PackageLocation)
Build Number $(BuildNumber)
Build Definition $(BuildDefinition)
TFS Collection $(TfsUrlWithCollection)
Team Project $(TeamProject)
RM System Variables (vNext templates only)
Request New Features
Components use Tools. You can create your own tool and use it in a custom component. The component can then be used in a Release Template.
Friday, November 7, 2014
Automated Deployment
Attempts to addresses the multiple binaries per environment issue by using the Parameters.xml file. Compatible with Release Management.
http://www.colinsalmcorner.com/post/webdeploy-and-release-management--the-proper-way
Creating a Build Definition That Supports Deployment
Install and Configure Release Management
Release Management Installation Guide (pdf)
Release Management User Guide (pdf)
Overview Graphic
How to create web deployment alone package using TFS
Powershell DSC
/p:MSDeployPublishMethod=InProc
/p:WebPublishMethod=MSDeploy
/p:MSDeployPublishMethod=InProc
This works, you'll need to fill in the username and pword in the queue dialog:
/p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:WebPublishMethod=MSDeploy /p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=RemoteAgent /p:MSDeployServiceUrl=http://fscee29028-1 /p:DeployIisAppPath="vaww.clfm-dev.fsc.va.gov" /p:UserName= /p:Password=
This works also (removed first 2 params from above)
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:WebPublishMethod=MSDeploy /p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=RemoteAgent /p:MSDeployServiceUrl=http://fscee29028-1 /p:DeployIisAppPath="vaww.clfm-dev.fsc.va.gov" /p:UserName= /p:Password=
/p:DeployOnBuild=true;PublishProfile=fscee29028-1_CLFM_WebInt.pubxml /p:Password=
MSBuild.exe MyWebs.sln /p:Configuration=Release /p:DeployOnBuild=true;PublishProfile=DeployToDirectory.pubxml
Subscribe to:
Posts (Atom)