This question is locked. New answers and comments are not allowed.
Hi,
I'm new to OA and (missing some simple basic examples) I browsed around a bit in blogs and other things.
First of all -- the Tool is great.
Simply make a few clicks and have a table generated from a class.
I use SQL 2005 as database.
First thing I noticed -- I had to change all VARCHARS to NVARCHARS - I found no way to set this as default.
Anyhow - I could create a table with a few mousclicks.
Last not least - now I am at the same step as if I would have created the class via LINQ to SQL.
The pro till now --- LINQ to SQL requires a lot of "code changeing" and it works "reverse" so the class follows the DB.
Now with LINQ I get (with almos the same effort as with OA) a list of my records.
Further I act with this list - update my Fields anywhere in code and so on.
Absolutly no contact with LINQ to SQL at the moment.
When I decide to save my Changes I write db.SubmitChanges(); - done.
What means for me that (for an example) if I want to bind my data to a WPF form I add a "load data" button which makes a few lines of "LINQ to SQL" calls - retrive a list (Table) bind it to controls and done.
To store the values - another button which calls the "SubmitChanges()".
(I assume no adding / deleting).
--------
From what I learned with OA (Ralph's great blog http://object-relational-mapping.blogspot.com/2007/03/basic-crud-operations-part-22.html) I always have to encapsulate updates in a transaction.
So far I see this now - I have to mess around with OA not only at loading / storing - but also druing updates.
Did I missunderstand something, or is this like I think?
Sorry if I ask stupid questions - but I'm missing simple examples like the ones for LINQ where such things are covered in a very basic way. Your (much more featured) examples are to complex for me to find the "basic operations" in code.
CONCLUSION (questions):
a.) Is there a way to "default" the desinger to NVARCHAR with strings in SQL Server?
b.) Is there some simple example which does
----1,) Read a list of (simple) Objects from a table (no refs nothing)
----2.) Insert an object (not persisting at the moment)
----3.) Delete an object (not persisiting at the moment)
---4.) Change some values of an object (also not persisting)
---5.) Write back all the changes at a specific moment (Button Click or so)
Regards
Manfred
I'm new to OA and (missing some simple basic examples) I browsed around a bit in blogs and other things.
First of all -- the Tool is great.
Simply make a few clicks and have a table generated from a class.
I use SQL 2005 as database.
First thing I noticed -- I had to change all VARCHARS to NVARCHARS - I found no way to set this as default.
Anyhow - I could create a table with a few mousclicks.
Last not least - now I am at the same step as if I would have created the class via LINQ to SQL.
The pro till now --- LINQ to SQL requires a lot of "code changeing" and it works "reverse" so the class follows the DB.
Now with LINQ I get (with almos the same effort as with OA) a list of my records.
Further I act with this list - update my Fields anywhere in code and so on.
Absolutly no contact with LINQ to SQL at the moment.
When I decide to save my Changes I write db.SubmitChanges(); - done.
What means for me that (for an example) if I want to bind my data to a WPF form I add a "load data" button which makes a few lines of "LINQ to SQL" calls - retrive a list (Table) bind it to controls and done.
To store the values - another button which calls the "SubmitChanges()".
(I assume no adding / deleting).
--------
From what I learned with OA (Ralph's great blog http://object-relational-mapping.blogspot.com/2007/03/basic-crud-operations-part-22.html) I always have to encapsulate updates in a transaction.
So far I see this now - I have to mess around with OA not only at loading / storing - but also druing updates.
Did I missunderstand something, or is this like I think?
Sorry if I ask stupid questions - but I'm missing simple examples like the ones for LINQ where such things are covered in a very basic way. Your (much more featured) examples are to complex for me to find the "basic operations" in code.
CONCLUSION (questions):
a.) Is there a way to "default" the desinger to NVARCHAR with strings in SQL Server?
b.) Is there some simple example which does
----1,) Read a list of (simple) Objects from a table (no refs nothing)
----2.) Insert an object (not persisting at the moment)
----3.) Delete an object (not persisiting at the moment)
---4.) Change some values of an object (also not persisting)
---5.) Write back all the changes at a specific moment (Button Click or so)
Regards
Manfred