GithubHelp home page GithubHelp logo

cyberflamego / .net-datastore-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appeon/.net-datastore-example

0.0 2.0 0.0 1.38 MB

This C# project is created in SnapDevelop. It uses .NET DataStore to create the Web APIs that allow you to perform CRUD operations and transaction management with SQL Server.

License: Other

Smalltalk 77.40% C# 22.60%

.net-datastore-example's Introduction

.NET DataStore Example

This demo project targets .NET 6, and uses .NET DataStore to create the Web APIs that allow you to perform CRUD operations and transaction management with SQL Server. This demo also provides a PowerBuilder project that you can download and use as a client application to call the Web APIs.
Note that this demo implements the Web APIs with synchronous methods. Asynchronous methods are planned for a future release.

Prerequisites

  • SnapDevelop 2022
  • PowerBuidler 2022
  • SQL Server 2019, 2017, or 2016

Setting Up This Demo

  1. Download the SQL Server backup file AdventureWorks_for_sqlserver.zip from .NET-Project-Example-Database, and restore the database using the backup file.

  2. Download and open this demo in SnapDevelop. Make sure you’re connected to the Internet so that the NuGet packages required by the project can be restored.

  3. In the Solution Explorer, open the file appsettings.json, and modify the Data Source, Initial Catalog, User ID, and Password in the connection string based on your environment. Note that the value of the Initial Catalog must be the same as the name of database (AdventureWorks2012 by default) you restored in the SQL Server.

    "ConnectionStrings": { "AdventureWorks": "Data Source=127.0.0.1; Initial Catalog=AdventureWorks2012; Integrated Security=False; User ID=sa; Password=123456; Pooling=True; Min Pool Size=0; Max Pool Size=100; ApplicationIntent=ReadWrite;Trust Server Certificate=True" }

    The code above also specifies the connection name as “AdventureWorks”. The connection name must be the same as the one in the ConfigureServices method of Startup.cs:

    services.AddDataContext<OrderContext>(m => m.UseSqlServer(Configuration, "AdventureWorks"));  

.net-datastore-example's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.