开发者

ASP.net c# help with data manipulation

开发者 https://www.devze.com 2023-03-12 14:23 出处:网络
I need some advice on a little project im doing. I have a database which holds sales details, I have created a view which gets all the data that I need. I now need to get the data from the view manipu

I need some advice on a little project im doing. I have a database which holds sales details, I have created a view which gets all the data that I need. I now need to get the data from the view manipulate the data and display it on the website.

please can you advice me on the best way i can get the data from the database to my asp.net application.

iv set up a datasource on the webpage, but im a bit stuck on how i can manipulate the data from this datasource.

UPDATE

sorry i forgot to mention that im using Interbase so im having to use a ODBC connector to interface between asp.net and the database. i was under the impression that LINQ2SQL is only for SQL server. normally i would just use data re开发者_开发技巧ader and put that into a dataset, but due to the interbase issue im having to create a SQL data source. – c11ada 1 min ago edit


You have different options:

  • Read data directly with DataReader or Dataset
  • Use Linq2SQL Use
  • Entity Framework (EF)

I would recommend using LINQ or EF because they are simpler and Object Oriented. Between them probably LINQ is simpler to set up and EF is more powerful.

It is easy to find info and examples of all those options.


That depends on the quantity of manipulation and your skills. Using datareader or dataset is normally have good knowledge then other techniques even though they are standard and good to use. As @gustavogb suggested you can use anyone, but that really depends on your skills and interest to upgrade the knowledge.

0

精彩评论

暂无评论...
验证码 换一张
取 消