CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • Dynamic Update Statements and Property Table Information

    rated by 0 users
    Answered (Verified) This post has 1 verified answer | 2 Replies | 1 Follower

    Not Ranked
    2 Posts
    bigphildogg86 posted on Mon, Aug 19 2013 9:58 AM

    Hi all!  I have been working with CSLA for over a year now and have typically used the model of having insert, update and selection stored procedures.  But for flexibility I had heard that there was a way that the objects could dynamically save themselves without doing a stored procedure.  

    Is there a structure in CSLA.NET 4 that would allow us to store table specific information for saving?  The other piece to this is that we have a front-end that the user can filter and completely change the criteria so for the Retrieve I am dynamically creating the Select statement and the front-end is passing in the Where clause.  However the where clause is going to have the property name and I'll need to translate that to table name and field name when it comes in.  

    I looked around online and have been searching for any info on this but haven't come up with much.  

    Any ideas on this?  Thanks in advance!  

    Answered (Verified) Verified Answer

    Top 10 Contributor
    2,279 Posts
    Verified by bigphildogg86

    No, there is no structure in CSLA .NET where you can store this type of information. 

    I have seen some project using NHibernate mappings by attributes but that would only work on the platforms that NHibernate support (and as such has nothing to do with CSLA .NET)

    My preference is to use ObjectFactory or Repository pattern and keep the business objects as "clean" as possible. This means that the criteria representation that comes from the client must be processed on the DAL side to generate the actual where clause/select statement. This will work on ANY platform that CSLA .NET is available on. 

    Jonny Bekkum, Norway CslaContrib Coordinator

    All Replies

    Top 10 Contributor
    2,279 Posts
    Verified by bigphildogg86

    No, there is no structure in CSLA .NET where you can store this type of information. 

    I have seen some project using NHibernate mappings by attributes but that would only work on the platforms that NHibernate support (and as such has nothing to do with CSLA .NET)

    My preference is to use ObjectFactory or Repository pattern and keep the business objects as "clean" as possible. This means that the criteria representation that comes from the client must be processed on the DAL side to generate the actual where clause/select statement. This will work on ANY platform that CSLA .NET is available on. 

    Jonny Bekkum, Norway CslaContrib Coordinator

    Not Ranked
    2 Posts

    Thanks!  I figured it couldn't hurt to ask as I was starting to get the impression after looking around that this wasn't available.  We'll be doing some mapping I think on the database side between object properties and their table and field names I think at this point. 

     

    Thanks again!

    Page 1 of 1 (3 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems