WebApi与WinForms

人气:507 发布:2022-09-22 标签: c# visual-studio webapi

问题描述

嗨。 我需要一些指导,我有一个WinForm应用程序,它收集信息以连接到将要使用的数据库和列名。之后我必须在html页面中将这些列值显示为图表。 我被告知使用WebApi和我的WinForm。 我认为WebAPi将充当服务,使javascript将读取的文件(json)作为url提供,因为javascript无法从本地机器读取文件(c:\\ \\documents \ ...)。 我的问题是: - 我怎么办我的WinForm中的WebApi? - 我如何建立WebApi来做我想做的事? 有人能帮助我吗? /> 如果可能,你可以提供一些示例代码吗? 你的时间

Hi. I need some guidance, I have a WinForm app that collects info to connect to a database and column names that will be used. After that I have to show those column values as charts in a html page. I've been told to use WebApi with my WinForm. I think that the WebAPi will act as a service to make the file that javascript will read (json) available as url, since javascript can't read a file from local machine (c:\documents\...). My questions are: - how can i run the WebApi in my WinForm? - how can i build the WebApi to do what i want? Can anyone help me? If possible can you provide me some example code? thk for your time

推荐答案

为什么在发布问题之前你没有搜索谷歌(我搜索过Web API + Winform)? :( CRUD操作使用Web API和Windows应用程序 [ ^ ] Why didn't you search Google(I searched Web API + Winform) for this before posting question? :( CRUD Operation using Web API and Windows Application[^]

219