1

I am very new to windows software development. I have created a web site using VS Express 2013. It reads an xml file, connects to 4 different databases, it fetches data from these databases according to the xml file and stores the new data on a new database and displays on the screen.

The problem is: reading the data from the xml and databases must happen at the background. Users should only see the output. So I have decided to create a console application and use windows task scheduler which will call the console application every hour.

My question is:

Can I use the same code (asp.net web) on the c# console application without making too much changes?

At the moment I am downloading visual studio 2013 and I have got no idea what to do.

1 Answer 1

1

It depend of the referenced assemblies that you are using in your code but generally, if your dependances are referenced, your c# code can be used for both web and console application.

To do things right, it is better to put your code in a third-party class library that can be referenced at your choice, either in a console application startup project or a website startup project.

Sign up to request clarification or add additional context in comments.

1 Comment

i have just created the console application. It was much easier than i thought. I only changed couple of lines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.