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 static List<EventData> GetAll() | |
{ | |
using (var session = store.OpenSession()) | |
{ | |
RavenQueryStatistics stats; | |
// get the first page |
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.Linq; | |
using System.Linq.Expressions; | |
namespace MGMAuthCORS.Models | |
{ | |
public interface IEventDataRepository : IDisposable | |
{ |
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
//001: RAVEN DB LINQ QUERY | |
var results = session.Query<Car>() | |
.Statistics(out stats) | |
.Skip(0*10) // retrieve results for the first page | |
.Take(20) // page size is 20 | |
.Where(x => x.Make == "Ford") | |
.Distinct().ToList(); | |
//002: descending orderby | |
var query = this._unit.Homes.GetAll().OrderByDescending(s => s.Price); |
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
[assembly: WebActivator.PreApplicationStartMethod(typeof(CountingKs.App_Start.NinjectWebCommon), "Start")] | |
[assembly: WebActivator.ApplicationShutdownMethodAttribute(typeof(CountingKs.App_Start.NinjectWebCommon), "Stop")] | |
namespace CountingKs.App_Start | |
{ | |
using System; | |
using System.Web; | |
using System.Web.Http; | |
using CountingKs.Data; | |
using Microsoft.Web.Infrastructure.DynamicModuleHelper; |
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 CountingKs.Data; | |
using CountingKs.Data.Entities; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; |
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 CountingKs.Data; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; |
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
<script> | |
(function() | |
{ | |
$sentDialog.on("hidden.bs.modal", function () { | |
//do some work, save form, move onto another page etc | |
//show the Alert |
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
<script> | |
(function(){ | |
$("#contactForm input[type=submit]").tooltip(); | |
//alternative is to set delay in code with more options: | |
$("#contactForm input[type=submit]").tooltip( | |
{ | |
delay:{ | |
show: 500, | |
hide: 0 |
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
<!--tab control for address and contact form--> | |
<ul class="nav nav-tabs"> | |
<li class="active"> | |
<a href="#formTab" data-toggle="tab">Contact Form</a></li> | |
<li> | |
<a href="#addressTab" data-toggle="tab">Address</a> | |
</li> | |
</ul> | |
<div class="tab-content"> |
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
(function() | |
{ | |
//get a referenct to the dialog | |
var $sentDialog = $("#sentDialog"); | |
debugger; |