-
Notifications
You must be signed in to change notification settings - Fork 936
/
Copy pathIKeyMapper.cs
41 lines (37 loc) · 1.13 KB
/
IKeyMapper.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Linq.Expressions;
using System.Reflection;
namespace NHibernate.Mapping.ByCode
{
public enum OnDeleteAction
{
NoAction,
Cascade,
}
public interface IKeyMapper : IColumnsMapper
{
void OnDelete(OnDeleteAction deleteAction);
void PropertyRef(MemberInfo property);
void Update(bool consideredInUpdateQuery);
void NotNullable(bool notnull);
void Unique(bool unique);
/// <summary>
/// Set the Foreign-Key name
/// </summary>
/// <param name="foreignKeyName">The name of the Foreign-Key</param>
/// <remarks>
/// Where the <paramref name="foreignKeyName"/> is "none" or <see cref="string.Empty"/> or all white-spaces the FK won't be created.
/// Use null to reset the default NHibernate's behavior.
/// </remarks>
void ForeignKey(string foreignKeyName);
}
public interface IKeyMapper<TEntity> : IColumnsMapper
{
void OnDelete(OnDeleteAction deleteAction);
void PropertyRef<TProperty>(Expression<Func<TEntity, TProperty>> propertyGetter);
void Update(bool consideredInUpdateQuery);
void ForeignKey(string foreignKeyName);
void NotNullable(bool notnull);
void Unique(bool unique);
}
}