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
namespace MyProject.Web.Binders{ | |
using System.Web.Mvc; | |
using Domain; | |
public class RootBinder<TRoot,TRepository>:DefaultModelBinder | |
where TRepository:IRepository<TRoot> where TRoot:IRoot{ | |
private readonly TRepository _repository; | |
public RootBinder(TRepository repository){ | |
Guard.AgainstNull(repository); | |
_repository=repository; | |
} |
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
namespace MyProject.Web.Binders{ | |
using System.Web.Mvc; | |
using Domain; | |
public class RootBinder<TRoot,TRepository>:DefaultModelBinder | |
where TRepository:IRepository<TRoot> where TRoot:IRoot{ | |
private readonly TRepository _repository; | |
public RootBinder(TRepository repository){ | |
Guard.AgainstNull(repository); | |
_repository=repository; | |
} |
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
namespace Interreg.Web.Bootstrap{ | |
using System; | |
using Config; | |
using Microsoft.Practices.ServiceLocation; | |
using MvcExtensions; | |
using NHibernate; | |
using NHibernate.Context; | |
using StructureMap; | |
public class NHibernateTask:BootstrapperTask{ | |
private readonly IContainer _container; |
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
namespace Interreg.Config{ | |
using System; | |
using System.IO; | |
using Domain; | |
using FluentNHibernate.Automapping; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using FluentNHibernate.Conventions.Helpers; | |
using NHibernate; | |
using NHibernate.Context; |
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
namespace Web.Bootstrap { | |
using CommandHandlers; | |
using Microsoft.Practices.ServiceLocation; | |
using MvcExtensions; | |
using Ncqrs; | |
using Ncqrs.Commanding.ServiceModel; | |
using Ncqrs.Config.StructureMap; | |
using Ncqrs.Domain; | |
using Ncqrs.Domain.Storage; | |
using Ncqrs.Eventing.ServiceModel.Bus; |
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
protected override void ExecuteInContext(IUnitOfWorkContext context, RegisterNewAffairCmd cmd) | |
{ | |
var affair=Affair.RegisterAffair(cmd.AffairId, cmd.Name, cmd.Location); | |
//how to save it? :/ | |
context. | |
_repository.Save(affair); | |
context.Accept(); | |
} | |
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
/// <summary> | |
/// Validates that record is found in Aleph by GetDigitalObjectFromAleph method | |
/// or user has processed it. | |
/// Filters records which were not found in Aleph by GetDigitalObjectFromAleph method | |
/// and not processed by user. | |
/// </summary> | |
/// <param name="codeTableCode">The code table code.</param> | |
/// <param name="value">The value.</param> | |
/// <param name="elementId">The element id.</param> | |
/// <param name="elementName">Name of the element.</param> |
NewerOlder