CheddarGetter.CollabCoders 1.0.4

.NET Standard 2.0
NuGet\Install-Package CheddarGetter.CollabCoders -Version 1.0.4
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.
dotnet add package CheddarGetter.CollabCoders --version 1.0.4
<PackageReference Include="CheddarGetter.CollabCoders" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CheddarGetter.CollabCoders --version 1.0.4
#r "nuget: CheddarGetter.CollabCoders, 1.0.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CheddarGetter.CollabCoders as a Cake Addin
#addin nuget:?package=CheddarGetter.CollabCoders&version=1.0.4

// Install CheddarGetter.CollabCoders as a Cake Tool
#tool nuget:?package=CheddarGetter.CollabCoders&version=1.0.4

CheddarGetter .Net Core API Services Wrapper

Uses .Net Core Dependancy Injection for ChaddarGetter API (extended from John Siladie's nofxsnap/CheddarGetter repo). API wrapper has implemented all of CheddarGetter's APIs as of 10/21/2017.

1) Install required NuGet packages

To use .NET Core dependency injection with options, these two packages are needed:

Microsoft.Extensions.DependencyInjection - this is the package for the core dependency injection features, such as the ServiceCollection class.

Microsoft.Extensions.Options – this package contains the IOptions interface, the OptionsManager for instantiating the options, as well as the extension methods AddOptions and Configure.

2) Install CheddarGetter.CollabCoders NuGet Package

https://www.nuget.org/packages/CheddarGetter.CollabCoders

3) Add the CheddarGetter namespace of your Startup.cs

using CheddarGetter;

4) Register the CheddarGetter Service with dependancy injection in the ConfigureServices portion of your Startup.cs:

public void ConfigureServices(IServiceCollection services)
{
    services.AddCheddarGetterService(options =>
    {
	options.productCode = "YourCheddarGetterProductCode";
	options.username = "YourCheddarGetterUserName";
	options.password = "YourCheddarGetterPassword";
    });
}

5) Add the CheddarGetter Service to you constructor on your Controller or Services

using CheddarGetter;

public class YourController
{
    //Constructor
    private readonly ICheddarGetterService _cheddarGetterService;
    
    public YourController(ICheddarGetterService cheddarGetterService)
    {
    	_cheddarGetterService = cheddarGetterService;
    }
}

6) Add the CheddarGetter Service interface to you constructor on your Controller or Services

public class YourController
{
    //Constructor
    private readonly ICheddarGetterService _cheddarGetterService;

    public YourController(ICheddarGetterService cheddarGetterService)
    {
        _cheddarGetterService = cheddarGetterService;
    }

    //Sample Usage of CheddarGetterService
    public async Task<IActionResult> UpdateCustomer(SomeSampleUserModel user) 
    {
        var customer = new Customer
	{
	    Code = user.userId.ToString(),
	    FirstName = user.firstName,
	    LastName = user.lastName,
	    Email = user.email,
	    Company = user.Company,
	    RemoteAddress = Request.HttpContext.Connection.RemoteIpAddress,
	    AdditionalMetaData = "metaData[someCustomParam]=someCustomValue&metaData[someOtherParam]=SomeOtherValue"
        };
	await _cheddarGetterService.CreateCustomer(customer);
	return Json(customer);
    }
}

NOTE: CheddarGetter allows you to store custom meta data for each customer. The Customer and CustomerPost models have an extra string parameter called AdditionalMetaData, which you can use to pass an array of meta data parameters in a standard QueryString format (like in the example above).

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
1.0.4 1,182 11/10/2017
1.0.3 769 11/10/2017
1.0.2 814 10/21/2017
1.0.1 890 9/30/2017

Updated more changes to CG API