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 DocumentManager | |
{ | |
public static readonly string SessionKey = "current.session"; | |
public static IDocumentStore CurrentDocumentStore { get; private set; } | |
public static IDocumentSession CurrentSession | |
{ | |
get |
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
# Auto detect text files and perform LF normalization | |
* text=auto | |
# These files are text and should be normalized (convert crlf => lf) | |
*.cs text diff=csharp | |
*.java text diff=java | |
*.html text diff=html | |
*.js text | |
*.cshtml text |
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
from doc in docs | |
where doc["@metadata"]["Raven-Replication-Conflict"] | |
select new { Id = doc.__document_id } |
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
namespace ConsoleApplication { | |
class Program { | |
static void Main( string[] args ) { | |
var store = new DocumentStore() { | |
Url = "<your-url-here>", | |
Credentials = new System.Net.NetworkCredential() { | |
UserName = "<your-username>", | |
Password = "<your-password>", |
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 const string RavenSessionKey = "raven.session"; | |
public IDocumentSession RavenSession { get; set; } | |
protected override void Initialize( System.Web.Routing.RequestContext requestContext ) { | |
base.Initialize( requestContext ); | |
RavenSession = (IDocumentSession) HttpContext.Items[ RavenSessionKey ]; | |
} |
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
<add key="blog:path" value="myblog"/> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Simple Polygon</title> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; |
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 Raven.Client.Documents; | |
using Raven.TestDriver; | |
using Xunit; | |
using System.Linq; | |
using Raven.Client.Documents.Indexes; | |
using Raven.Client.Documents.Session; | |
using System; | |
namespace RavenDBTestCase { | |
public class RavenDbRqlIssue : RavenTestDriver { |
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 Raven.Client.Documents; | |
using Raven.TestDriver; | |
using Xunit; | |
using System.Linq; | |
using Raven.Client.Documents.Indexes; | |
using Raven.Client.Documents.Session; | |
using System; | |
namespace RavenDBTestCase { | |
public class RavenDbRqlIssue : RavenTestDriver { |
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
Failed to execute mapping function on contracts-8314. Exception: System.InvalidOperationException: The output of the mapping function does not contain all fields that the index is supposed to group by. | |
Output: { AccountId = accounts-994, ContractId = contracts-8314, DateCreated = 04/02/2019 15:03:47, DateLastModified = 02/24/2020 09:13:05 } | |
Group by fields: AccountId,ContractId | |
Compiled index def: | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Text.RegularExpressions; |
OlderNewer