Questions tagged [csla]

CSLA .NET provides a home for your business logic. It helps you build a scalable and reusable business domain object model for your application. Your business logic can run anywhere .NET runs: Windows, iOS, Android, Linux, Mac, and more.

Questions with the csla tag should relate to the CSLA .NET framework.

CSLA .NET

A Home for Your Business Logic

CSLA .NET is an open source framework, created by Rockford Lhotka, designed to help developers create a rich, scalable, reusable, and maintainable business domain model for their application. This business domain model is ideally designed around user scenarios/stories or use cases, and encapsulates business, validation, and authorization rules.

CSLA .NET also supports an architectural concept called mobile objects. Using this concept, in an n-tier application the business object graphs are able to move between the client workstation and application server. The CSLA .NET data portal enables this concept, as well as completely abstracting any idea of the network from the application code. The result is that an application can switch from a 1- or 2-tier deployment to a 3- or 4-tier deployment without needing to change any application code.

The platforms supported by CSLA .NET include:

  1. Windows (MAUI, UWP, WPF, Windows Forms)
  2. Android (MAUI, Xamarin)
  3. iOS (MAUI, Xamarin)
  4. MacOS (MAUI, Xamarin, .NET Core)
  5. Linux (MAUI, Xamarin, .NET Core)
  6. WebAssembly (Blazor, Uno, etc.)
  7. Blazor, ASP.NET MVC, Razor Pages, Web API, Web Forms

The primary feature areas provided by CSLA .NET are:

  1. Business rules: CSLA .NET includes a rules engine supporting business, validation, and authorization rules. This engine integrates with, and extends, standard DataAnnotations, and brings DataAnnotations support to WP7 and Windows Forms. Additionally, it supports synchronous and asynchronous rule execution
  2. Data binding support: Business objects created with CSLA .NET support data binding in all supported platforms. The data binding support includes full support for in-place editing in datagrid controls, as well as read-only data, and standard detail forms.
  3. LINQ: CSLA .NET collections are queryable, and can optionally create "live views" so changes made to the results of a LINQ query are automatically synchronized with the original business object.
  4. Mobile objects: Through the data portal, CSLA .NET supports 1-, 2-, 3-, and 4-tier application deployments, and allows an application to switch between deployment configurations without changing existing code.
  5. Abstract persistence: CSLA .NET is not an ORM and does not implement mapping to databases. However, the data portal does provide a clear, well-defined structure for invoking the application's data access layer. This is abstract, and supports the use of any data access technology, including ADO.NET, Entity Framework, dapper, REST service calls, interacting with the file system or XML files, or any other data access model you care to use.

Important links

Other resources

222 questions
1
vote
0 answers

How to use CSLA FieldDataManager to track individual property IsDirty status?

In a WinForms application I want to track the IsDirty status of a specific property (besides the IsDirty status of the business object. I found some references to Csla.Core.FieldManager.FieldDataManager being able to do this via its IsFieldDirty…
George
  • 315
  • 3
  • 15
1
vote
0 answers

How to customize Orchard's default FormsAuthentication to my own custom authentication

I need to customize Orchard's default FormsAuthentication to my own custom authentication Currently FormsAuthenticationService class is checking if (httpContext.IsBackgroundContext() || !httpContext.Request.IsAuthenticated ||…
Nitheesh
  • 15
  • 4
1
vote
1 answer

wpf error provider is not refreshing

I have a CSLA object with two managed properties and a custom Attribute. The requirements is to have at least one property null. In other words: If Property A is set to something and property B already has a value, then property A and B becomes…
TheOne
  • 157
  • 16
1
vote
2 answers

Why are the business rules written in C# (Code)?

I am looking at the Lhotka CSLA.NET object library (Lhotka.NET). It seems interesting, but one thing which does not make sense is that the business rules are written in C#. Should these not be coded outside of code (even though it would be a library…
GurdeepS
  • 65,107
  • 109
  • 251
  • 387
1
vote
2 answers

CSLA.NET Min/Max Count Rule for BusinessBindingListBase

The business layer in our application uses CSLA.NET. I've got business classes named Invoice and InvoiceItem (derived from a subclass of CSLA BusinessBase) and InvoiceItemList (derived from a subclass of CSLA BusinessBindingListBase). Invoice class…
M. Rashid
  • 159
  • 6
1
vote
1 answer

CSLA FilteredBindingList - Partial Matches

I am currently writing a .Net web application, making use of SortedBindingList and FilteredBindingList. One issue I have run into is that the FilteredBindingList is matching both partial matches and full matches. This works great when filtering…
Cuddles
  • 51
  • 7
1
vote
1 answer

WCF Data Services How do I add Business Logic or use existing CSLA objects

First of all, this is my first Stack Overflow question so apologies in advance if I get this wrong! I'm working on creating a service endpoint for a CRM database used internally. Several applications want to read and write to this database so…
1
vote
1 answer

CSLA Implementing code for Save and Delete Buttons

I'm new to CSLA , so here is my question. I have simple windows form application with datagridview and 2 buttons, Save and Delete.I need a solution for implementing Save() method for Save button, and Delete() method for Delete button.I believe it is…
Hank Mooody
  • 527
  • 11
  • 29
1
vote
4 answers

Why assign lambda expression to private field?

I was looking at some code at work and came across something I'm not familiar with. here is full property im familiar with: private int myVar; public int MyProperty { get { return myVar; } set { myVar = value; } } but then I saw (and I…
Liger86
  • 57
  • 1
  • 8
1
vote
1 answer

CslaModelBinder not binding child list

I have the following business classes public class EditableRoot:Csla.BusinessBase { public string Name { get; private set; } public int Id { get; private set; } public static EditableRoot New() { return…
ARs
  • 466
  • 1
  • 7
  • 14
1
vote
2 answers

msbuild for .NET 3.5 issue with csla and System.Linq

This is a weird problem. I am trying to build a .NET 3.5 solution with msbuild. I generally write custom build scripts for this, and when I tried this time to build a simple .NET assembly which internally uses CSLA, it started giving me Linq…
Sash
  • 3,525
  • 3
  • 19
  • 17
1
vote
1 answer

CSLA with WCF nettcpbinding

I am using CSLA.NET. It works realy nice with the wsHttpBinding. Now, I have my own Windows-Service and search the solution, that I can use this Windows-Service as the CSLA-Server and using nettcpbinding. Can someone give me a tip how to going on?…
BennoDual
  • 5,865
  • 15
  • 67
  • 153
1
vote
1 answer

Is it a good idea to make my MEF parts lifetime Shared on this case?

I've used CSLA as a part of my Web Solution's Architecture and, in order to be able to manage repository pattern, the IoC container for my DataAccess Layer works with MEF (By using CSLA-Contrib). It is known that the first load of the MEF Catalog…
1
vote
1 answer

Async validation rule in csla

Does anyone have a simple example of implementing an async validation rule in csla? I have looked at the example in the Company class in the Rolodex sample but this isn't particularly clear to me: why do I need a command class? I'm using csla 3.8 in…
Steve
  • 2,073
  • 4
  • 27
  • 39
1
vote
1 answer

"Default principal object cannot be set twice" error implementing WEB API with CSLA backend

Can anyone save some of my hair? :) I'm trying to create an asp.net WEB API interface for an older CSLA (1.x/2.x era) project. I am testing by hard coding the login on every request in various ways (once in the startup code, as an authorization…
JohnC
  • 3,938
  • 7
  • 41
  • 48