Category: nuget

  • SqlExtensionsAspire–part 1–idea

    Aspire is a popular orchestrator for managing projects and Docker containers in the .NET ecosystem. While it’s primarily known for .NET, Aspire also supports other technologies like Node.js, Python, and more. Since I use SQL Server as my database, I found myself needing a few essential features: Execute pre-defined SQL commands at database creation timeI…

  • Nuget packages and Github repositories

    You can see the Github repositories that you have worked  last year by going to https://docs.github.com/en/graphql/overview/explorer and entering query ContributionGraph {   user(login: “ignatandrei”) {     contributionsCollection(       from: “2022-01-01T00:00:00+00:00”       to: “2022-12-31T00:00:00+00:00”     ) {       commitContributionsByRepository(maxRepositories:100){         repository{           nameWithOwner           url           updatedAt         }       }           }   } } Mine are ignatandrei/TILT ignatandrei/BlocklyAutomation ignatandrei/QueryViewer ignatandrei/RSCG_AMS ignatandrei/rxDemo ignatandrei/NetCoreUsefullEndpoints ignatandrei/Presentations ignatandrei/NETCoreBlockly ignatandrei/FunctionsDI ignatandrei/GeneratorOfHelp ignatandrei/MicroservicesPortChooser…

  • [Programmer Tools]NuGet used

    The list have been obtained with the help of VisualAPI,former BlocklyAutomation. You can obtain a list on your device by running dotnet tool update –global programmerall –no-cache programerall Then browse to http://localhost:37283/blocklyAutomation/automation/loadexample/nugets and press Execute ( You can have automation the same for your site – just contact me) This are the NuGet packages found…

  • [Nuget] dotnet-run-script

    I found this awesome package – https://github.com/xt0rted/dotnet-run-script . It is good to make macros in global.json,then execute in a CICD scenario. For example,NetCoreUsefullEndpoints used this in yaml ( pretty standard ) # – name: Restore dependencies #   run: | #     cd src #     cd UsefullEndpoints #     dotnet tool restore #     dotnet pwsh readme.ps1 #     dotnet…

  • NetCoreUsefullEndpoints-4 Nuget package

    or NugetPackages there is a simple .NET Pack CLI command  and many configurations However,it is not so simple . See https://docs.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices . In practice,I have a readme.md file ( for showing on nuget.org ) and a readme.txt file( for the programmer to show help after installing the package) THis is what I have in the…

  • DIForFunctions–NuGet- part3

    The important part now is to make public – that means NuGet and documentation,The NuGet is pretty simple – with dotnet pack and with GitHub Actions – in order to do automatically every time I modify the main. For now,this is the action name: .NET on:   push:     branches: [ “main” ]   pull_request:…

  • DI for Functions- work–part 2

    Let’s begin with tests  – we need to have a class with multiple functions that have multiple [FromServices} parameter. Like public bool TestMyFunc1([FromServices] TestDI1 t1,[FromServices] TestDI2 t2,int x,int y)         {             return true;         }         public bool TestMyFunc2([FromServices] TestDI1 t12,  int x,int y)         {             return true;         } // more others Because there are multiple functions,I need to…

  • DI for Functions–idea – part 1

    Looking at ASP.NET Core,there is a wonderful feature that  gives you thinking :  you can put in any action for a controller FromServices argument and the framework will complete from,well,services: : public ActionResult Test([FromServices] MyFunction What if  you can do the same with any function from any class ? It will be good,but … how …

  • Services.Add => 2 NuGet

    If you make a NuGet package for ASP.NET Core  and you make an extension method that calls Services.AddWhatever in order to add a Sngleton / Scoped / Transient a IWhatever =>  Whatever implementation,please add IWhatever in a separate Nuget . Why ? Because not all ASP>NET Core projects are made of a single project –…

  • [NuGet]: Transplator

    This is a Nuget that it is what Razor should have been. It is a Roslyn Source Code Generator that transforms template into code. Link: https://www.nuget.org/packages/Transplator  Site: https://github.com/atifaziz/Transplator What it does:  Takes a template and generates source code for outputting anything inside. Usage: Somewhere in the csproj: <ItemGroup>   <CompilerVisibleProperty Include=”DebugTransplator” />   <CompilerVisibleItemMetadata Include=”AdditionalFiles” MetadataName=”SourceItemType” />  …