Skip to content

Instantly share code, notes, and snippets.

namespace MvcApplication1
{
class TestModule : NinjectModule
{
public override void Load()
{
Bind<IPersonRepository>().To<FakePersonRepository>();
}
}
@hurricanepkt
hurricanepkt / MailMessage to MailAddresses Many to many including DB fields
Created March 15, 2011 20:43
MailMessage to MailAddresses Many to many including DB fields
modelBuilder.Entity<MailMessage>()
.HasMany(m => m.MailAddresses)
.WithMany(a => a.MailMessages)
.Map(g =>
{
g.MapLeftKey(m => m.DBid, "MailMessages_DBid");
g.MapRightKey(a => a.Address, "MailAddresses_Address");
g.ToTable("MailMessageMailAddress");
});
@hurricanepkt
hurricanepkt / KnockoutFriendOrders.html
Created May 19, 2011 12:57
Why don't the friend orders update
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Index</title>
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="/Scripts/modernizr-1.7.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery.tmpl.min.js" type="text/javascript"></script>
@hurricanepkt
hurricanepkt / MockSpyPattern
Created October 6, 2011 17:39
What pattern is this (mock spy ?? )
//DynamicModel is the main part of Massive
//https://github.com/robconery/massive
class SpyMassive : DynamicModel
{
//Created an empty base constructor for massive to prevent exceptions
public SpyMassive() : base()
{
}
///Edited for brevity
@hurricanepkt
hurricanepkt / Outline
Created February 16, 2012 19:47
LIG Video Outline
Segment #1; “Welcome to LIG”
• Company introduction
• Company services
• Longshore 5 ways
Segment #2; “Your Customer Experience”
• Longshore Toolbox
• LIG Marine Portfolio
• Online Programs
.container { background-color : #C0C0C0; }
.colborder { border-right: 2px solid #DDD;}
/*
960 Grid System ~ Core CSS.
Learn more ~ http://960.gs/
Licensed under GPL and MIT.
*/
/*
<?xml version="1.0"?>
<INSURED>ohio valley</INSURED>
@hurricanepkt
hurricanepkt / audit_trigger.sql
Created May 9, 2012 07:20
Problem with Azure and DBCC InputBuffer
CREATE TRIGGER [dbo].[tbl_Client_Audit_Logging]
ON [dbo].[tbl_Client]
AFTER INSERT,UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
@hurricanepkt
hurricanepkt / Start.xml
Created July 11, 2012 15:41
any text editors that can help me with this odd replace
<question type="radio"
name="InsuredPIMEL"
required="Yes"
question="If the above question is answered yes, does the insured have a P&amp;I with crew or MEL policy in place?" >
<choice value="Yes" />
<choice value="No" />
<choice value="N/A" />
<location index="37" Location="LLite!D39" />
<location index="50" Location="LLite!D39" />
<location index="51" Location="LLite!D39" />
@hurricanepkt
hurricanepkt / WET Constructor
Created October 3, 2012 21:21
This feels a little WET
private readonly IWrapper _wrapper;
private readonly IRepo _repo;
private readonly IAccountTools _accountTools;
private readonly IPolicyRepository _policyRepository;
private readonly IOpportunityPolicyLookupRepository _opportunityPolicyLookupRepository;
public PolicyPusher(IWrapper wrapper, IRepo repo, IAccountTools accountTools, IPolicyRepository policyRepository, IOpportunityPolicyLookupRepository opportunityPolicyLookupRepository)
{
_wrapper = wrapper;
_repo = repo;
_accountTools = accountTools;