简体   繁体   English

如何创建 Web 表单并将其连接到 Azure Cosmos DB? [等候接听]

[英]How to create a web-form and connect it to Azure Cosmos DB? [on hold]

I want to create a web-form for data entry in my database, displaying data from the database for the naive user who cannot code or doesn't know how to retrieve the query from the database.我想为我的数据库中的数据输入创建一个 Web 表单,为无法编码或不知道如何从数据库中检索查询的天真用户显示数据库中的数据。 I am using Microsoft Azure Cosmos DB for building my database and I am trying to figure out to create a web form without extensive coding maybe something like asp.net drag-drop forms and connect it to the Azure database. I am using Microsoft Azure Cosmos DB for building my database and I am trying to figure out to create a web form without extensive coding maybe something like asp.net drag-drop forms and connect it to the Azure database.

I tried asp.net web-form but I couldn't find a way to connect to Azure Cosmos DB.我尝试了 asp.net 网络表单,但找不到连接到 Azure Cosmos DB 的方法。

If someone can help that would be great!!如果有人可以提供帮助,那就太好了!!

You need to use Azure Cosmos DB client library for .NET Core by using the dotnet add package command.您需要使用 dotnet add package 命令为 .NET Core 使用 Azure Cosmos DB 客户端库。

dotnet add package Microsoft.Azure.Cosmos

DOCS

There's no drag and drop solution for it.没有拖放解决方案。 As @sajeetharan said, you'll need to code the CRUD functionality using Azure Cosmos DB SDK.正如@sajeetharan 所说,您需要使用 Azure Cosmos DB SDK 对 CRUD 功能进行编码。

There is a sample using ASPNET MVC Core which you can use as a getting started for your need, all you need to do is replace the controller part to methods in your code behind.有一个使用 ASPNET MVC Core 的示例,您可以将其用作您需要的入门,您只需将 controller 部分替换为后面代码中的方法即可。

https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-dotnet-application https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-dotnet-application

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM