This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrderViewModel { | |
public bool UsingOldCard {get;set;} | |
public int OldCardId {get;set;} | |
public NewCardViewModel NewCard {get;set} | |
public int ItemId {get;set;} | |
} | |
public class NewCardViewModelValidator: AbstractValidator<NewCardViewModel> { | |
public class NewCardViewModelValidator() { | |
RuleFor(m => m.FirstName).NotEmpty(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="jquery-1.5.1.js" /> | |
/// <reference path="jquery.validate.js" /> | |
/*! | |
** Unobtrusive validation support library for jQuery and jQuery Validate | |
** Copyright (C) Microsoft Corporation. All rights reserved. | |
*/ | |
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ | |
/*global document: false, jQuery: false */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# more helpful source control prompts | |
parse_git_branch () { | |
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)# (git::\1)#' | |
} | |
parse_hg_branch() { | |
hg branch 2>/dev/null | sed 's#\(.*\)# (hg::\1)#' | |
} | |
parse_svn_branch() { | |
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk '{print " (svn::"$1")" }' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage | |
_db.Query<Story, Stories_Search>() | |
.If(status.HasValue, q => q.Where(x => x.Status == status)) | |
.If(!curatorId.IsEmpty(), q => q.Where(x => x.CuratorId == curatorId)) | |
.If(publicationDate.HasValue, q => q.Where(x => x.ProposedPublicationDate == publicationDate.Value.Date)) | |
.OrderByDescending(x => x.CreatedAt) | |
.ToPagedList(page, size); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Raven.Client; | |
using Raven.Client.Document; | |
using Raven.Client.Shard; | |
namespace ShardingExample | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RavenDB Questions | |
================================= | |
1. When should you start thinking about Replication with RavenDB? | |
a. What factors affect whether you should be thinking about replication. | |
b. since we are on replication, How does Master/Slave work in RavenDB and can we see it? | |
2. When should you start thinking about Sharding with RavenDB (# of documents, app locations, etc.)? | |
a. What factors affect whether you should be thinking about replication. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Had to modify the ScriptCs ScriptExecutor to include System.Configuration | |
// It works as expected to get the appSettings, but not the natural way | |
// most devs will be used to with ConfigurationManager.AppSettings, also | |
// not sure if things like SmtpClient will pickup on it. | |
using System; | |
using System.Configuration; | |
var path = Environment.CurrentDirectory + "\\app.config"; | |
Console.WriteLine(path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace RandomScheduler | |
{ | |
class Program | |
{ | |
public static Random R = new Random(); | |
static void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using EndToEnd.Core; | |
using FluentAssertions; | |
using ServiceStack.FluentValidation; | |
using ServiceStack.ServiceClient.Web; | |
using ServiceStack.ServiceInterface.Auth; | |
using Xunit; | |
namespace EndToEnd | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using EndToEnd.Core; | |
using FluentAssertions; | |
using ServiceStack.FluentValidation; | |
using ServiceStack.ServiceClient.Web; | |
using ServiceStack.ServiceInterface.Auth; | |
using Xunit; | |
namespace EndToEnd | |
{ |
OlderNewer