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.Reflection; | |
using NHibernate; | |
using NHibernate.Cfg; | |
using NHibernate.Cfg.MappingSchema; | |
using NHibernate.Mapping.ByCode; | |
namespace ManhattanProject | |
{ | |
public class NHibernateConfig | |
{ |
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 Customer | |
{ | |
public virtual int Id { get; set; } | |
public virtual string FirstName { get; set; } | |
public virtual string LastName { get; set; } | |
} |
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.DirectoryServices; | |
using System.DirectoryServices.Protocols; | |
using System.Net; | |
bool ValidateUser(string username, string password) | |
{ | |
bool authorized = false; | |
using(LdapConnection connection = new LdapConnection("192.168.0.5")) | |
{ |
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 CommonDomain.Core; | |
namespace commondomain | |
{ | |
// This is my old buddy Account. It inherits from AggregateBase, which comes from CommonDomain. | |
// There's no real need to bring CommonDomain in if you don't want. It provides a couple simple mechanisms for me. | |
// First, it gives me the IRepository wrapper around EventStore which I use above in my CommandHandlers | |
// Second, it gives me a base that tracks all of my uncommitted changes for me. | |
// Third, it wires up, by convention, my event handlers (the private void Apply(SomeEvent @event) methods |
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
# tests/support/fixtures/accounts_fixtures.ex | |
defmodule Nononon.TestFixtures.AccountsFixtures do | |
alias Nononon.Repo | |
alias Nononon.Accounts.{ | |
Group, | |
User, | |
Permission, | |
GroupUser, | |
GroupPermission |