需要使用Windows服务更新记录集 [英] Need to update the set of records using Windows Service

查看:70
本文介绍了需要使用Windows服务更新记录集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个要求,需要根据采样更新sql表中的记录(即假设,没有记录= 10,如果采样是50%那么5条记录需要更新,如果抽样是70%那么7个记录需要使用窗口服务更新。)使用实体框架工作



请告诉我如何使用窗口服务实现C#



是Windows服务和实体框架工作的新手。请指导我。如何向前推进。



先谢谢,

Hi All,
I have a requirement that, Need to update the records in sql table based on sampling (i.e,assume, no of records=10 ,if sampling is 50% then 5 records need to update,if sampling is 70% then 7 records need to update using window service . ) using Entity Frame work

Kindly advise me how to implement in window service using C#

Am new to windows service & Entity frame work .Kindly guide me .How to take it forward.

Thanks in Advance,

推荐答案

我建​​议从这个网站上的文章开始,例如创建简单的Windows服务 [ ^ ]。



关于.Net的好处是没有无论你写什么样的项目, C#通常是一样的。因此,在Visual Studio中创建一个Windows服务作为一个新项目,然后编写代码来访问数据库,然后你需要阅读文章,了解如何调试和测试它。
I'd suggest starting with the articles on this site, for example Creating a simple Windows Service[^].

The nice thing about .Net is no matter what kind of project you write, the C# will often be the same. So, create a Windows Service as a new project in Visual Studio and then write the code to access the db however you need to and then read through the article for how to debug and test it.


即使在Windows服务中,代码也将保持不变。它最终只是一个控制台应用程序,它只部署为Windows服务。所以你的代码然后把它放在windows服务中。

下面是一些链接,它们将帮助你如何创建和部署Windows服务。

用C#创建基本Windows服务 [ ^ ]

http://www.csharp-examples.net/install-net-service/ [ ^ ]
Code will remain same even in Windows Service. It is ultimately a console application only which deploys as a Windows service. So do your code and then put it in windows service.
Below are some links which will help you to how to create and deploy windows service.
Creating a Basic Windows Service in C#[^]
http://www.csharp-examples.net/install-net-service/[^]


这篇关于需要使用Windows服务更新记录集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆