Beginner to datasets - readings suggestion [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am a beginner to .Net. Recently I am working on a small practice project in which i want to interact with SQL DB using Datasets in VS .net 2008. Kindly suggest me few readings regarding Typed Datasets.

If you prefer to work with datasets (and ado.net in general), I would recommend Microsoft ADO.Net Core Reference. The book is dated now, but in my opinion, so is using datasets. Either way, you can't beat that book in my opinion. The follow up book, which covers ADO.Net 2.0 is more modern and done almost as well as the original (though the original will teach you more about how everything works).

you can google these things. however check the below links
MSDN Documents
Creation of Typed DataSet

A search in google for DataSet Examples C# turned the following results:
DataSet examples C#
Are you sure you want to use DataSet? There are a better techniques now for accessing and manipulating data.
Update:
Depending on your needs there are other ways to access data.
If you need speed - you will probably need to use SqlDataReader.
If you need ease of use, you may skip the more "core" ways of accessing data and use Entity Framework.
Retrieving data with Sql Data Reader
Getting started with Entity Framework
The difference is that SQL Data Reader is the most native way of accessing data. It it uses something like cursor you iterate over.
Entity Framework on the other hand is a fully featured OR/M solution for Microsoft Visual Studio, you basically tell Visual Studio where your data is and it will generate the data classes for you. From there - you just use those classes. It is really easy to use but it uses reflection under the hood which makes it a bit slower than the Sql Data Reader.
Hope this helps!

Related

Entity Framework - shall I take the risk? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have dome some seriously complex projects using the traditional WebForms and Stored procedures. Recently, however, I did a project using MVC and Entity Framework and I liked they way it works with Entity framework. They way its lets you deal with entities in object oriented manner...Its awesome. The project was not very complex. Just about 12 -15 tables.
We all know that WebForms and stored procedures are more mature and hence reliable technologies of doing thing. With my knowledge EF is still evolving. It doesn't even have the very basic "Unique Constraints". Although there are work around for things, It make's me think twice before starting a project with EF.
What I want to ask is, If I want to start another huge and complex project, can I chose to go with MVC & EF ? Is there any risk of hitting a dead end ?
Personally I use EF and MVC for every one of my new projects. I have yet to encounter a drawback. On the contrary, I find MVC far better to work with. With regards to your stored procedures, they are still and always will be more efficient than running TSQL ad-hoc.. just replace your normal ADO.NET code with EF and continue using the stored procedures. As for unique constrains, you still do those in the DB itself. More info here:
Unique constraint in Entity Framework
and here:
Does Entity Framework 5 support unique constraints?
Also, check this link for using stored procs and ad-hoc TSQL queries with EF: http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/advanced-entity-framework-scenarios-for-an-mvc-web-application
There is little risk of using EF and MVC for complex projects. If you use EF, you can still call stored procedures or execute dynamic sql queries (not that you should). EF gives you options. There maybe more risk of not using it. Don't forget SO is built with MVC.

Existing Datamap for TYPO3 to Joomla? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for an existing datamap and/or MySQL script that can migrate data between TYPO3 and Joomla. Obviously, both CMS use MySQL and that's great, but I'm wondering if there is already a document/script that takes the elements from TYPO3 database and puts them in the Joomla database.
I'm planning to write my own migration program in C# so if anyone has some code snippets for that, it would also be helpful.
Forget that, there are too many differences to make it possible... TYPO3 instances are built typically with many various extension + pages + content elements etc. Although Joomla's initial structure is quite simple (as far as I remember) when you are adding new plugins it changes in many different ways. Conclusion is simple if somebody wrote such 'mapper' between his TYPO3 and his Joomla most probably will not work in any other combination.
How many pages are there in the TYPO3 ? if less than 100 I wouldn't waste a time for any programm, just copy/paste it in common editing mode.
If more, I think that would be best solution to write a TYPO3 extension (PHP), which will get all required data from some page using it's parsers, configs etc and will convert it to JSON (or even pure SQL insert statements) with structure understandable in Joomla. Keep in mind that many elements can be quite different in the database - than on the client's side. The best example are internal links which in DB are saved just as ID's of pages to which they are pointing. You need to resolve it on the TYPO3 side, or you'll need to learn how relations are built in TYPO3's database to do the same task in your C# application.

Code Generation - Domain/model first (DDD) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a 'complete' solution for code-generation based on DDD or model first approach. Ideally, this would be a separate application or VS plugin that we could use and re-use to generate as much of the standard plumbing code as possible, preserving my custom business logic as well.
I would like to generate VS projects, including WCF sercvice app, Data layer, entity model etc. and client applications such as ASP.MVC (and/or web-forms) sites with scaffolding, windows client.
I know there are many choices like Entity Framework vs NHibernate, open-source frameworks such as S#ahrp Architecture, and there are commercial products as well. I'm open to anything as I know most of the investment will be in time.
Update:
To add to this: The Entity Framework (4.0) is a big step forward as it will generate c# business classes as well as the database schema, allowing you to focus on the 'model', which is good. Is there anything that will go one level higher to allow generation of other objects based on a (meta)model of some kind.
I'd recommend taking a look at CodeSmith. It comes with several different template frameworks like PLINQO (Linq-to-SQL), NHibernate, CSLA and .netTiers (which sounds closer to what you are looking for).
Also take a look at the video tutorials on how to use the frameworks located here.
Thanks
-Blake Niemyjski
I understand that SparxEA (Enterprise Architect) supports code generation (and the generation of models from code) but I've never actually done that with it myself.
So this should definately allow you to model your system / domain and then generate appropriate code.
It also seems to support integration with Visual Studio: http://www.sparxsystems.com.au/products/mdg/int/vs/index.html

What is best ORM with these requirements [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm looking for a good ORM for an upcoming project.
The database will have around 1000 to 1200 tables, and it will be in Both SQL Server and Oracle, which will be used depending of customers enterprise needs.
Also a few part of the project will work with WCF services.
I want a designer or something like that.
Good support of LINQ.
Acceptable performance.
I have tried DataObjects.Net but it doesn't have any designer. We can't code all that tables nor use code generator. And I'm not sure if DataObjects.Net supports switching database.
Also I'm familiar with EF4 but it can't support both databases together, and switching databases manually(modifying the edmx file) is such a pain in ... for maintenance job.
Thanks in advance.
Edit: Seems OpenAccess and LLBLGEN Pro have designer but I don't have experience with them.
I would still vote for Entity Framework v4 - EF4.
After all:
you can have multiple EDMX files, no problem - one for SQL Server, one for Oracle
you could put those into their own class library, and then load or, or the other, or both, if needed, at runtime (e.g. by using the Managed Extensibility Framework or something of your own)
you can easily target those EDMX files at databases using connection strings - really not hard at all
OpenAccess can also do the job for you. You could use the multiple .rlinq files and assembly-per-database approach as suggested with Entity Framework. The benefit I see for you would be the support you will get from Telerik as there is quite a chance for you to hit a rock or two while developing a solution of such proportions.
Given this information I would suggest to look into NHibernate (and/or fluent-nhibernate).
The item you will have to look into is performance. This depends heavily on the nature of your application. 1,000 to 1,200 tables sounds massive, so I'd recommend to definitely run a number of meaningful performance tests (in addition to all the other tests) before you finalize the decision.
Edit: In fact the better starting place for NHibernate is nhibernate.info (Thanks, Justin!).
I think you'll need to pick your ORM and designer tool separately. For example, go with EF and LLBLGEN, or NHibernate and CodeSmith, or NHibernate and LLBLGEN, etc.
I would also suggest NHibernate but the place to research it is definitely NHForge:
http://nhibernate.info/
Here is the high-level feature overview (including LINQ):
http://nhibernate.info/doc/nhibernate-features.html
There are a few designers available, including LLBLGen Pro:
http://nhibernate.info/doc/commercial-product-ecosystem.html
NHibernate 3 is in alpha now but I know that it is already being used in production a few places. That might be the best way to go for a new project.

What is the best database for a C# Desktop App? (NO NETWORKING) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
What should I use? I need to store data, and it only needs to be on the local machine. I will be storing all string variables, and in many columns.
What is the best? Would it even be a database?
I would recomend db4o, an object database engine. It's pretty straightforward and no server or installation is needed on the client. Another alternative would be SQLite. You can get the .NET provider here.
Edit
See db4o tutorial here.
SQL Server Compact 3.5 SP1 does not require installation (You just need to deliver the .dlls, although check the EULA if that's allowed) and is rather straight forward to use.
I would recommend using sqlite, it's a very fast file-only, embedded-able, feature-rich, database. I have a lightweight ORM with C# bindings that abstracts and simplifies access to it. Here is a live web-service demo using sqlite.
Oh yeah db4o is a good choice as well which I also have C# database bindings for that supports C# automatic properties (as the default db4o provider doesn't) and other common data access scenarios.
You should look at SQLite if you're looking for an RDBMS or something like MongoDB if you're storing objects or similar.
Why not SQL Server Express? It's even free.
I would highly recommend checking out the serialization framework. It's not even close to the performance of a database, BUT, if you're not talking about a lot of data, it has about 100% less overhead. Serializing objects to a file in .net is child's play:
XmlSerializer serializer = new XmlSerializer(typeof(myObjectType));
using(FileStream stream = new FileStream("file", FileMode.Create, FileAccess.Write)
{
serializer.Serialize(stream, myObject);
}
That's it!
Reading back is pretty much the opposite. LINQ provides even more options. Again, this is not even close to a db in terms of performance, but I have seen many, many implementations wherein a database was extreme overkill for the amount of data being stored. Obviously, if you have a clear need to scale, etc, you'll want to plan for that. Right tool for the right problem and all that.
If you're just looking to store a small amount of data in a fairly simple structure, and aren't going to be doing any complex querying, then consider an XML file. You don't need any additional software, and you can work with it easily using LINQ to XML.
XML can instead of your requirement!
check out memcache if you want extremely fast speed. But they don't write to hard drive, so you might still need other mentioned db if you want to store them across sessions.
In my project, we use mongodb to buffer data and use memcache to buffer for mongo. So data will be retrieved from memcache first, if not found, try mongo. If still not found, we then get new data.
For windows and .net, look at here

Categories