CodedThought.Core.Data.SqlServer
8.0.0-beta-6
This is a prerelease version of CodedThought.Core.Data.SqlServer.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CodedThought.Core.Data.SqlServer --version 8.0.0-beta-6
NuGet\Install-Package CodedThought.Core.Data.SqlServer -Version 8.0.0-beta-6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodedThought.Core.Data.SqlServer" Version="8.0.0-beta-6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodedThought.Core.Data.SqlServer --version 8.0.0-beta-6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodedThought.Core.Data.SqlServer, 8.0.0-beta-6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CodedThought.Core.Data.SqlServer as a Cake Addin #addin nuget:?package=CodedThought.Core.Data.SqlServer&version=8.0.0-beta-6&prerelease // Install CodedThought.Core.Data.SqlServer as a Cake Tool #tool nuget:?package=CodedThought.Core.Data.SqlServer&version=8.0.0-beta-6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodedThought.Core.Data.SqlServer
A .NET Core Data Entity Provider for Sql Server.
Requirements
SqlServer requires CodedThough.Core.Configuration and CodedThought.Core. These can be found in NuGet. - CodedThought.Core.Configuration - CodedThought.Core
Usage
- Install required packages. See requirements above.
- Add the Database Connection settings in the appSetting.json or a custom .json file.
Note: See CodedThought.Core.Configuration for JSON configguration specifications.
- Add a new class and inherit from
CodedThough.Core.Data.GenericDataStoreController
. Below is a sample class file.
using CodedThought.Core;
using CodedThought.Core.Data;
public class DataController : GenericDataStoreController {
public DataController(IMemoryCache cache, CodedThought.Core.Configuration.ConnectionSetting connectionSetting ) {
DataStore = new GenericDataStore(cache, connectionSetting, "dbo");
}
public Person GetPerson(string email)
{
try
{
ParameterCollection param = DataStore.CreateParameterCollection();
param.AddStringParameter("EmailAddress", email);
return DataStore.Get<Person>(param);
} catch (Exception)
{
throw;
}
}
public List<Person> GetPeople() {
try {
return DataStore.GetMultiple<Person>(null);
} catch {
throw;
}
}
}
using System.Data;
using CodedThought.Core;
using CodedThought.Core.Data;
///<summary>
/// Person class used by the framework to locate the right table and columns with class and proprety annotations.
///</summary>
[DataTable("tblPeople")]
public class Person
{
public Person() { }
[DataColumn("EmailAddress", DbType.String, DataColumnOptions.PrimaryKey)]
public string EmailAddress { get; set; }
[DataColumn("FirstName", DbType.String)]
public string FirstName { get; set; }
[DataColumn("LastName", DbType.String)]
public string LastName { get; set; }
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- CodedThought.Core (>= 8.0.0-beta-8)
- Microsoft.Data.SqlClient (>= 5.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.1.1 | 86 | 12/11/2024 |
8.0.1 | 86 | 11/20/2024 |
8.0.0-beta-7 | 75 | 11/6/2024 |
8.0.0-beta-6 | 293 | 6/3/2024 |
8.0.0-beta-5 | 92 | 5/30/2024 |
8.0.0-beta-4 | 103 | 5/30/2024 |
8.0.0-beta-3 | 86 | 5/30/2024 |
8.0.0-beta-2 | 107 | 5/30/2024 |
8.0.0-beta-1 | 102 | 5/29/2024 |
8.0.0-alpha-7 | 106 | 5/17/2024 |
6.0.0.6 | 278 | 11/8/2023 |