-
Hi I think we're going to have to stick with Linq to SQL. At least we can use the same connection from the ConnectManager without any mods to the other DataAccess code. In many ways L2S is perfect for our requirements. I guess we'll just leave EF for new projects and hope that L2S doesn't get removed from future .NET assemblies! DataSets
-
Hi Jonny Yes I now see this is the only way according to the EF docs. So I think I have to accept that I shouldn't try to mix ordinary ADO.NET code and EF code in the same transaction. That's not so bad. What is important is that I can use the DbContextManager and ConnectionManager in the same DAL. I'm using the DalManager to retrieve various
-
Hi I have a lot of DAL code using the ConnectionManager, e.g. public void Insert(int accountID) { using (var ctx = ConnectionManager<SqlConnection>.GetManager(Database)) { using (var command = ctx.Connection.CreateCommand()) { command.CommandText = "INSERT etc"; command.Parameters.AddWithValue("@AccountID", accountID); command
-
OK I hadn't thought about how the CancelEdit works so wrongly assumed the objects would revert to the extact original state. I'm using windows forms in this project so I've added a SortedBindingList to bind to the BindingSource. Now it works as I expected. Thank you Andrew
-
Hi CSLA v4.3.13 This looks like a bug to me. If I call CancelEdit on an object with a child collection the collection is restored in reverse order from the original. Can you suggest a fix or workaround? Thanks Andrew
-
I managed to find out why I was getting the error. I needed to do an EndEdit on the BindingSource used by the DataGridView in the main form. I have tested it and things seem to behave as expected. I am unsure about the requirement to unbind the whole object graph before using the n-level stuff in the BO. In my example I have the main form then a modal
-
Thanks for the guidelines and BindingHelper class. I am still having problems when I call ApplyEdit on my child object after unbinding the datasource. 'Edit level mismatch in AcceptChanges' The object exists in the following graph: BusinessBase, BusinessBindingListBase, BusinessBase Is it because I am working on a child object? I also made sure
-
Hi I'm trying to update an old windows forms project with business objects databinding and n-level undo. I have a main form with a button to open a modal dialog. In the constructor of the dialog I get a child object from the parent and call BeginEdit before binding to a BindingSource. If the user hits ok after editing I ApplyEdit before the dialog
-
Hi Yes I downloaded from here: http://www.lhotka.net/files/csla40/Csla-4.5.10.exe
-
Hi JonnyBee Just to be clear - after installing CSLA 4.5, any new .NET v4.0 project in VS 2010 and VS2012, without references to any CSLA assemblies, will display the error dialog mentioned. One wouldn't expect CSLA to have an effect on the VS environment without at least being referenced in the projects. I would probably only want to use CSLA 4