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 Skight.Demo.Domain.Examination | |
{ | |
public class Exam | |
{ | |
public virtual int Id { get; set; } | |
public virtual string Code { get; set; } | |
public virtual string Name { 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; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
namespace Skight.Demo.Domain | |
{ | |
public interface Repository | |
{ | |
Item get_by_id<Item>(int 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 Skight.Demo.Domain | |
{ | |
public interface Query<Item> | |
{ | |
} | |
} |
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 System.Collections.Generic; | |
using System.Linq; | |
using NHibernate; | |
using NHibernate.Criterion; | |
using Skight.Demo.Domain; | |
using Skight.Demo.NHRepository.QueryImpls; | |
namespace Skight.Demo.NHRepository | |
{ |
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 System.IO; | |
using System.Reflection; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using NHibernate; | |
using NHibernate.Cfg; | |
using NHibernate.Tool.hbm2ddl; | |
namespace Skight.Demo.NHRepository |
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 FluentNHibernate.Mapping; | |
using Skight.Demo.Domain.Examination; | |
namespace Skight.Demo.NHRepository | |
{ | |
public class ExamMap:ClassMap<Exam> | |
{ | |
public ExamMap() | |
{ | |
Id(x => x.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
using NHibernate.Criterion; | |
using Skight.Demo.Domain; | |
namespace Skight.Demo.NHRepository.QueryImpls | |
{ | |
public class QueryImplByQueryOver<item>:Query<item> | |
{ | |
public QueryImplByQueryOver(QueryOver<item> query) | |
{ | |
Query = query; |
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 NUnit.Framework; | |
namespace Skight.Demo.NHRepository.Tests | |
{ | |
[TestFixture] | |
public class CreateDatabase | |
{ | |
[Test] | |
public void Run() | |
{ |
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 NHibernate; | |
using NHibernate.Context; | |
using NUnit.Framework; | |
using Skight.Demo.Domain; | |
using Skight.Demo.Domain.Examination; | |
namespace Skight.Demo.NHRepository.Tests | |
{ | |
[TestFixture] | |
public class DataOperation |
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 System.Collections.Generic; | |
using System.Text; | |
using Machine.Specifications; | |
using NUnit.Framework; | |
namespace Skight.HelpCenter.Domain.Specs | |
{ | |
/// <summary> | |
/// Solution for ThoughtWorks的代码题 https://www.jinshuju.net/f/EGQL3D |
OlderNewer