English 中文(简体)
ASP.NET and Objects
原标题:

I ve been tasked with a project that requires me to convert a quote for a set of products that is displayed online into a particular file format for import into a third party application. All of the information I need is stored in a database that I can easily access.

Unfortunately, I absolutely have to offer this as a web interface and they want it to be a natural extension of their current ASP.NET product.

Even more unfortunate is that I ve had no prior experience in ASP.NET and, as a result, I can t seem to phrase my question in a way that gets the desire result in search engines. I guess I m behind on the proper terminology.

What I d like to do is to take the data in the database and read it into objects that I ve created in C# that hold their particular necessary attributes. For instance:

The QUOTE class contains a list of ITEM attributes. The ITEM class contains a list of MODIFICATIONs.

I could then just loop over all the line items and output the necessary information to perform the task.

I m familiar with Ruby on Rails and how I can set up objects, work on them, and then reference them in the view, but I m completely lost in ASP.NET.

So, the short version is this:

What am I trying to do in terms of ASP.NET terminology so that I can research how to do it?

Is it even possible?

最佳回答

You will need two things that will help you out tremendously, for this project and for the next ones:

  1. Learn a bit of LINQ, specifically Linq to SQL. The best book is "Linq in Action" by Manning. LINQ will open up a whole new horizon on data access and will make your like easier.
  2. Follow the ASP .NET MVC tutorial at NerdDinner.com. It will get you familiarized with MVC in a few hours.

You need less than a week to get you up to speed, and then the project will suddenly look a lot more approachable.

问题回答

If you are familiar with Rails, then you will want to look at ASP.Net MVC

You need an object-relational mapper, or ORM. The most popular one is NHibernate, and some folks have created a framework called ActiveRecord that sits atop it and acts sort of like the activerecord you re probably familiar with in Rails. Start your Googling there, with NHibernate.

they want it to be a natural extension of their current ASP.NET product.

Depending what platform they are in right now, if it s asp.net webform, then I suggest you look into GridView control since it s very powerful to display the grid Data.

If you go for Asp.Net mvc which is closer to Rails, then you may look into something like jqGrid.

First thing to do is define more clearly what you need to do.

It sounds like you need to add functionality to an existing web app that "displays a quote for a set of products" (like a shopping cart page), that is already saved in a database.

The functionality you need to add (I think), is a feature to convert the information for the quote from the database - into a particular file format (specified by the third party app that will import the information).

Is that correct, or is the scope of your task larger / smaller?





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签