-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathPage.cs
41 lines (35 loc) · 976 Bytes
/
Page.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
// Copyright (C) 2009-2021 Xtensive LLC.
// This code is distributed under MIT license terms.
// See the License.txt file in the project root for more information.
// Created by: Dmitri Maximov
// Created: 2009.11.27
using Xtensive.Orm;
namespace Xtensive.Orm.Localization.Tests.Model
{
[Serializable]
[HierarchyRoot]
public class Page : Entity, ILocalizable<PageLocalization>
{
[Field, Key]
public int Id { get; private set; }
// Non-persistent field
public string Title
{
get { return Localizations.Current.Title; }
set { Localizations.Current.Title = value; }
}
// Non-persistent field
public string Content
{
get { return Localizations.Current.Content; }
set { Localizations.Current.Content = value; }
}
/// <inheritdoc/>
[Field]
public LocalizationSet<PageLocalization> Localizations { get; private set; }
public Page(Session session)
: base(session)
{
}
}
}