开发者

C# Scripting - advice required please

开发者 https://www.devze.com 2023-01-12 15:19 出处:网络
I am developing an application to carry out pre-defined \"tasks\" on MSSQL database tables. It is really a tool to help with some repetitive data conversion/import tasks we have.

I am developing an application to carry out pre-defined "tasks" on MSSQL database tables. It is really a tool to help with some repetitive data conversion/import tasks we have.

In its SIMPLEST form it could be an "instruction" acting on a table ie. Take the contents of Field A and merge with Field B then write to Field C

I have implemented the basic framework (using SQL SMO) which allows for connecting to the database, selecting the table and fields and defining the output table and that is working fine.

I now need to implement some kind of scripting between the two so that I can

a. Build the "actions" using c#

b. Have some method of testing them?

c. Save these individual actions for future

d. Perhaps "string" them together to form more complex actions.

I am being drawn to using the Workflow Foundation classes, but (a) I dont know how easy this is going to be to integrate within my WinForms application 开发者_JAVA百科and (b) Are there any other more practical options that anyone has found workable

I am using C# .NET 3.5 VS2008

If anyone can offer any pointers I would appreciate it.

Roger Somerset UK


Have you considered SQL Server Integration Services (SSIS)? This MS tool is very powerful and allows you to build up complex actions such as getting data from different sources, sorting, merging and generally messing with it, and outputting it to various places. And you can code anything that's not supported out of the box in .Net.

Of course this isn't your own app so you're limited in how people interact with it (basically by running predefined scripts), testing is going to be more difficult, and you're dragging & dropping instead of writing code (which generally sucks!). So not much use if your users have to dynamically create new tasks, but if it does suit the bill it might well be the quickest way.

Other than that, it sounds like you might be looking at writing some kind of Domain Specific Language (DSL) for your users to input into your app, but that's going to be a lot of work.

0

精彩评论

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

关注公众号