This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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(); |
NewerOlder