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.
TestObjectFactory.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="TestObjectFactory.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>no summary</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Linq;
11using System.Text;
12
14{
15 public class TestObjectFactory : Csla.Server.ObjectFactory
16 {
17 public TestObjectFactory(ApplicationContext applicationContext) : base(applicationContext) {}
18
20 {
22 using (this.BypassPropertyChecks(returnValue))
23 {
24 returnValue.Id2 = 7; // bypass user rights
25 }
26 return returnValue;
27 }
28 }
29}
Provides consistent context information between the client and server DataPortal objects.
IDisposable BypassPropertyChecks(Csla.Core.BusinessBase businessObject)
By wrapping this property inside Using block you can set property values on businessObject business o...
TestObjectFactory(ApplicationContext applicationContext)