CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
CustomerWithEnum.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="CustomerWithEnum.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Implementation of a test business object with an enum.</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Linq;
11using System.Text;
12using Csla;
14
16{
17 public enum CustomerQuality
18 {
19 None = 0,
20 Good = 1,
21 Bad = 2
22 }
23
27 [Serializable()]
28 public sealed class CustomerWithEnum : BusinessBase<CustomerWithEnum>
29 {
30 #region Constructors
31
33 {
34 // Nothing
35 }
36
37 #endregion
38
39 #region Properties
40
41 private static PropertyInfo<string> Property_Name = RegisterProperty(new PropertyInfo<string>("Name", "Name"));
42
46 public string Name
47 {
48 get { return GetProperty(Property_Name); }
49 set { SetProperty(Property_Name, value); }
50 }
51
52 private static PropertyInfo<CustomerQuality> Property_Quality = RegisterProperty<CustomerQuality>(c => c.Quality, "Quality");
53
58 {
59 get { return GetProperty(Property_Quality); }
60 set { SetProperty(Property_Quality, value); }
61 }
62
63 #endregion
64 }
65}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
Implementation of a test business object with an enum.
string Name
Gets or sets the name of the CustomerWithEnum.
CustomerQuality Quality
Gets or sets the quality of the customer.
@ Serializable
Prevents updating or inserting until the transaction is complete.