CodedThought.Core.Data.SqlServer 6.0.0.6

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CodedThought.Core.Data.SqlServer --version 6.0.0.6
NuGet\Install-Package CodedThought.Core.Data.SqlServer -Version 6.0.0.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="6.0.0.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 6.0.0.6
#r "nuget: CodedThought.Core.Data.SqlServer, 6.0.0.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=6.0.0.6

// Install CodedThought.Core.Data.SqlServer as a Cake Tool
#tool nuget:?package=CodedThought.Core.Data.SqlServer&version=6.0.0.6

CodedThought.Core.Data.SqlServer

A .NET Core Data Entity Provider for Microsoft Sql Server.

Requirements

SqlServer requires CodedThough.Core.Configuration and CodedThought.Core. These can be found in NuGet. - CodedThought.Core.Configuration - CodedThought.Core

Usage

  1. Install required packages. See requirements above.
  2. Add the Database Connection settings in the appSetting.json or a custom .json file.

    Note: See CodedThought.Core.Configuration for JSON configguration specifications.

  3. 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 Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.

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.0-alpha-4 54 5/1/2024
6.0.0.6 234 11/8/2023