-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1,166 changed files
with
91,221 additions
and
91,208 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
[core] | ||
autocrlf=false | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Explicitly declare text files you want to always be normalized and converted | ||
# to native line endings on checkout. | ||
*.cs text diff=csharp | ||
*.xaml text | ||
*.txt text | ||
*.tt text | ||
*.ps1 text | ||
*.cmd text | ||
*.msbuild text | ||
*.md text | ||
|
||
*.sln text eol=crlf | ||
*.csproj text eol=crlf | ||
*.vbproj text eol=crlf | ||
*.fsproj text eol=crlf | ||
*.dbproj text eol=crlf | ||
|
||
# Resharper DotSettings files are in Unix format | ||
*.DotSettings text eol=lf | ||
|
||
# Binary files | ||
*.png binary | ||
*.jpg binary | ||
*.dll binary | ||
*.exe binary |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery | ||
- Personal attacks | ||
- Trolling or insulting/derogatory comments | ||
- Public or private harassment | ||
- Publishing other's private information, such as physical or electronic addresses, without explicit permission | ||
- Other unethical or unprofessional conduct | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident. | ||
|
||
# Contributor Code of Conduct | ||
|
||
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery | ||
- Personal attacks | ||
- Trolling or insulting/derogatory comments | ||
- Public or private harassment | ||
- Publishing other's private information, such as physical or electronic addresses, without explicit permission | ||
- Other unethical or unprofessional conduct | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident. | ||
|
||
This Code of Conduct is adapted from the Contributor Covenant, version 1.3.0, available from http://contributor-covenant.org/version/1/3/0/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
# Contribution Guidelines | ||
|
||
The wiki has a page on contributing to FNH: | ||
|
||
https://github.com/nhibernate/fluent-nhibernate/wiki/Contributing | ||
|
||
## Important | ||
If you've just pulled the FNH code into a local git repository for the first time, its really important that you set the core.autocrlf setting to false to avoid running into whitespace/line ending issues. Do this using the following command: | ||
|
||
``` | ||
git config core.autocrlf false | ||
``` | ||
|
||
|
||
# Contribution Guidelines | ||
|
||
The wiki has a page on contributing to FNH: | ||
|
||
https://github.com/nhibernate/fluent-nhibernate/wiki/Contributing |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
 | ||
|
||
[](https://ci.appveyor.com/project/nhibernate/fluent-nhibernate/branch/main) | ||
[](https://www.nuget.org/packages/FluentNHibernate) | ||
|
||
## What is FluentNHibernate? | ||
Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate. *Get your fluent on.* | ||
|
||
## Where can I get it? | ||
|
||
Install using the [FluentNHibernate NuGet package](https://www.nuget.org/packages/FluentNHibernate): | ||
|
||
``` | ||
dotnet add package FluentNHibernate | ||
``` | ||
|
||
## How do I use it? | ||
|
||
* Read the [introduction](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Getting-started). | ||
* Get latest version from NuGet | ||
- [.NETCore2.0, NETStandard2.0 or NET 4.6.1 with NHibernate 5.x](https://www.nuget.org/packages/FluentNHibernate) | ||
- [.NET 4.0 with NHibernate 4.x](https://www.nuget.org/packages/FluentNHibernate/2.0.3) | ||
- [.NET 3.5 with NHibernate 3 if you like it vintage](https://www.nuget.org/packages/FluentNHibernate.Net35) | ||
|
||
* Create your [first project](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Getting-started#wiki-yourfirstproject). | ||
|
||
## Further reading | ||
|
||
Once you've followed the above, you can compare our [auto mapping](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Auto-mapping) to our [fluent interface](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Fluent-mapping) to see which suits your application, read through our [API documentation](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Fluent-configuration), or just see what's available for reading in our [wiki](https://github.com/FluentNHibernate/fluent-nhibernate/wiki). | ||
|
||
Contributors | ||
--------------------------------------------- | ||
|
||
Fluent NHibernate wouldn't be possible without the time and effort of its contributors. The team comprises of [James Gregory](http://jagregory.com), [Paul Batum](http://www.paulbatum.com), Andrew Stewart, [Hudson Akridge](https://github.com/HudsonAkridge), [Gleb Chermennov](https://github.com/chester89) and [Jorge Rodríguez Galán](https://github.com/jrgcubano). | ||
|
||
**Our valued committers are:** Aaron Jensen, Alexander Gross, Andrew Stewart, Barry Dahlberg, Bobby Johnson, Brian Donahue, Cameron Harris, Chad Myers, Chris Chilvers, Craig Neuwirt, Dan Malcolm, Daniel Mirapalheta, David Archer, David Longnecker, David R. Longnecker, Derick Bailey, Erik Ojebo, Firo, Hudson Akridge, Ivan Zlatev, James Freiwirth, James Gregory, James Kovacs, Jeremy Skinner, Lee Henson, Louis DeJardin, Patric Forsgard, Paul Batum, Roelof Blom, Stuart Childs, Tom Janssens, Tuna Toksoz, U-BSOD\pruiz, di97mni, dschilling, felixg, jeremydmiller, kevm, leebrandt, maxild, robsosno, [Jorge Rodríguez Galán](https://github.com/jrgcubano) and many more.</p> | ||
|
||
Thanks goes to [Jeremy Miller](http://codebetter.com/blogs/jeremy.miller) for the original idea and implementation. | ||
|
||
Fluent NHibernate is © 2008-2018 [James Gregory](http://jagregory.com) and contributors under the [BSD license](https://github.com/nhibernate/fluent-nhibernate/blob/main/LICENSE) | ||
|
||
 | ||
|
||
[](https://ci.appveyor.com/project/nhibernate/fluent-nhibernate/branch/main) | ||
[](https://www.nuget.org/packages/FluentNHibernate) | ||
|
||
## What is FluentNHibernate? | ||
Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate. *Get your fluent on.* | ||
|
||
## Where can I get it? | ||
|
||
Install using the [FluentNHibernate NuGet package](https://www.nuget.org/packages/FluentNHibernate): | ||
|
||
``` | ||
dotnet add package FluentNHibernate | ||
``` | ||
|
||
## How do I use it? | ||
|
||
* Read the [introduction](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Getting-started). | ||
* Get latest version from NuGet | ||
- [.NETCore2.0, NETStandard2.0 or NET 4.6.1 with NHibernate 5.x](https://www.nuget.org/packages/FluentNHibernate) | ||
- [.NET 4.0 with NHibernate 4.x](https://www.nuget.org/packages/FluentNHibernate/2.0.3) | ||
- [.NET 3.5 with NHibernate 3 if you like it vintage](https://www.nuget.org/packages/FluentNHibernate.Net35) | ||
|
||
* Create your [first project](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Getting-started#wiki-yourfirstproject). | ||
|
||
## Further reading | ||
|
||
Once you've followed the above, you can compare our [auto mapping](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Auto-mapping) to our [fluent interface](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Fluent-mapping) to see which suits your application, read through our [API documentation](https://github.com/FluentNHibernate/fluent-nhibernate/wiki/Fluent-configuration), or just see what's available for reading in our [wiki](https://github.com/FluentNHibernate/fluent-nhibernate/wiki). | ||
|
||
Contributors | ||
--------------------------------------------- | ||
|
||
Fluent NHibernate wouldn't be possible without the time and effort of its contributors. The team comprises of [James Gregory](http://jagregory.com), [Paul Batum](http://www.paulbatum.com), Andrew Stewart, [Hudson Akridge](https://github.com/HudsonAkridge), [Gleb Chermennov](https://github.com/chester89) and [Jorge Rodríguez Galán](https://github.com/jrgcubano). | ||
|
||
**Our valued committers are:** Aaron Jensen, Alexander Gross, Andrew Stewart, Barry Dahlberg, Bobby Johnson, Brian Donahue, Cameron Harris, Chad Myers, Chris Chilvers, Craig Neuwirt, Dan Malcolm, Daniel Mirapalheta, David Archer, David Longnecker, David R. Longnecker, Derick Bailey, Erik Ojebo, Firo, Hudson Akridge, Ivan Zlatev, James Freiwirth, James Gregory, James Kovacs, Jeremy Skinner, Lee Henson, Louis DeJardin, Patric Forsgard, Paul Batum, Roelof Blom, Stuart Childs, Tom Janssens, Tuna Toksoz, U-BSOD\pruiz, di97mni, dschilling, felixg, jeremydmiller, kevm, leebrandt, maxild, robsosno, [Jorge Rodríguez Galán](https://github.com/jrgcubano) and many more.</p> | ||
|
||
Thanks goes to [Jeremy Miller](http://codebetter.com/blogs/jeremy.miller) for the original idea and implementation. | ||
|
||
Fluent NHibernate is © 2008-2018 [James Gregory](http://jagregory.com) and contributors under the [BSD license](https://github.com/nhibernate/fluent-nhibernate/blob/main/LICENSE) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
using FluentNHibernate.Conventions; | ||
using FluentNHibernate.Conventions.Instances; | ||
|
||
namespace Examples.FirstAutomappedProject; | ||
|
||
/// <summary> | ||
/// This is a convention that will be applied to all entities in your application. What this particular | ||
/// convention does is to specify that many-to-one, one-to-many, and many-to-many relationships will all | ||
/// have their Cascade option set to All. | ||
/// </summary> | ||
class CascadeConvention : IReferenceConvention, IHasManyConvention, IHasManyToManyConvention | ||
{ | ||
public void Apply(IManyToOneInstance instance) | ||
{ | ||
instance.Cascade.All(); | ||
} | ||
|
||
public void Apply(IOneToManyCollectionInstance instance) | ||
{ | ||
instance.Cascade.All(); | ||
} | ||
|
||
public void Apply(IManyToManyCollectionInstance instance) | ||
{ | ||
instance.Cascade.All(); | ||
} | ||
using FluentNHibernate.Conventions; | ||
using FluentNHibernate.Conventions.Instances; | ||
|
||
namespace Examples.FirstAutomappedProject; | ||
|
||
/// <summary> | ||
/// This is a convention that will be applied to all entities in your application. What this particular | ||
/// convention does is to specify that many-to-one, one-to-many, and many-to-many relationships will all | ||
/// have their Cascade option set to All. | ||
/// </summary> | ||
class CascadeConvention : IReferenceConvention, IHasManyConvention, IHasManyToManyConvention | ||
{ | ||
public void Apply(IManyToOneInstance instance) | ||
{ | ||
instance.Cascade.All(); | ||
} | ||
|
||
public void Apply(IOneToManyCollectionInstance instance) | ||
{ | ||
instance.Cascade.All(); | ||
} | ||
|
||
public void Apply(IManyToManyCollectionInstance instance) | ||
{ | ||
instance.Cascade.All(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Employee | ||
{ | ||
public virtual int Id { get; protected set; } | ||
public virtual string FirstName { get; set; } | ||
public virtual string LastName { get; set; } | ||
public virtual Store Store { get; set; } | ||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Employee | ||
{ | ||
public virtual int Id { get; protected set; } | ||
public virtual string FirstName { get; set; } | ||
public virtual string LastName { get; set; } | ||
public virtual Store Store { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Location | ||
{ | ||
public virtual int Aisle { get; set; } | ||
public virtual int Shelf { get; set; } | ||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Location | ||
{ | ||
public virtual int Aisle { get; set; } | ||
public virtual int Shelf { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Product | ||
{ | ||
public virtual int Id { get; protected set; } | ||
public virtual string Name { get; set; } | ||
public virtual double Price { get; set; } | ||
public virtual Location Location { get; set; } | ||
public virtual IList<Store> StoresStockedIn { get; set; } | ||
|
||
public Product() | ||
{ | ||
StoresStockedIn = new List<Store>(); | ||
} | ||
using System.Collections.Generic; | ||
|
||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Product | ||
{ | ||
public virtual int Id { get; protected set; } | ||
public virtual string Name { get; set; } | ||
public virtual double Price { get; set; } | ||
public virtual Location Location { get; set; } | ||
public virtual IList<Store> StoresStockedIn { get; set; } | ||
|
||
public Product() | ||
{ | ||
StoresStockedIn = new List<Store>(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Store | ||
{ | ||
public virtual int Id { get; protected set; } | ||
public virtual string Name { get; set; } | ||
public virtual IList<Product> Products { get; set; } | ||
public virtual IList<Employee> Staff { get; set; } | ||
|
||
public Store() | ||
{ | ||
Products = new List<Product>(); | ||
Staff = new List<Employee>(); | ||
} | ||
|
||
public virtual void AddProduct(Product product) | ||
{ | ||
product.StoresStockedIn.Add(this); | ||
Products.Add(product); | ||
} | ||
|
||
public virtual void AddEmployee(Employee employee) | ||
{ | ||
employee.Store = this; | ||
Staff.Add(employee); | ||
} | ||
using System.Collections.Generic; | ||
|
||
namespace Examples.FirstAutomappedProject.Entities; | ||
|
||
public class Store | ||
{ | ||
public virtual int Id { get; protected set; } | ||
public virtual string Name { get; set; } | ||
public virtual IList<Product> Products { get; set; } | ||
public virtual IList<Employee> Staff { get; set; } | ||
|
||
public Store() | ||
{ | ||
Products = new List<Product>(); | ||
Staff = new List<Employee>(); | ||
} | ||
|
||
public virtual void AddProduct(Product product) | ||
{ | ||
product.StoresStockedIn.Add(this); | ||
Products.Add(product); | ||
} | ||
|
||
public virtual void AddEmployee(Employee employee) | ||
{ | ||
employee.Store = this; | ||
Staff.Add(employee); | ||
} | ||
} |
Oops, something went wrong.