Creates the MemberGroupRepository and supporting models.

This commit is contained in:
Shannon
2014-02-10 19:35:32 +11:00
parent ec08d3e910
commit ffba271fd0
5 changed files with 229 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Models
{
/// <summary>
/// Represents a member type
/// </summary>
public interface IMemberGroup : IAggregateRoot
{
string Name { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Reflection;
using System.Runtime.Serialization;
using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Models
{
/// <summary>
/// Represents a member type
/// </summary>
[Serializable]
[DataContract(IsReference = true)]
public class MemberGroup : Entity, IMemberGroup
{
private string _name;
private static readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<MemberGroup, string>(x => x.Name);
[DataMember]
public string Name
{
get { return _name; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_name = value;
return _name;
}, _name, NameSelector);
}
}
}
}