Category: .NET Core

  • Book – Console 2 SAAS

    I have a passion to read – also a passion to teach . And to reach others,what is best than a book ? The idea of the book is how to pass from a Console application to a SAAS application –  with clear examples in .NET . I have written the book with the help…

  • [ADCES] Presentation WebAPI Best Practices

    I was happy to see so much people yesterday at https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/events/273919756/. ( in the same time .NET 5 was launching… ) You can find my presentation at https://ignatandrei.github.io/Presentations/WebAPIBPprez.html and code at https://ignatandrei.github.io/Presentations/WebAPIBP.zip . Thanks for coming and waiting to see you again at https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/events/273633735/

  • SideCarCLI- console to dot net tool

    To create a .NET Tool,please read first https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools-how-to-create  Of course,all the  nuget additional formats for csproj apply: read https://docs.microsoft.com/en-us/dotnet/core/tools/csproj . Of course,the easy way to in Visual Studio to right click the project,properties,Package. This is the final xml from .csproj: <PropertyGroup>     <OutputType>Exe</OutputType>     <TargetFramework>netcoreapp3.1</TargetFramework>     <RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>     <PackAsTool>true</PackAsTool>     <ToolCommandName>sidecarcli</ToolCommandName>     <Title>SideCarCLI</Title>          <PackageOutputPath>./nupkg</PackageOutputPath>     <PackageId>sidecarcli</PackageId>     <Version>2020.111.104</Version>     <Authors>Andrei Ignat</Authors>     <Company>AOM</Company>     <Product>sidecarcli</Product>    …

  • SideCARCLI–Finish process after some time

    One of the feature is to let the original process execute just a limited amount of time. For this,I have defined an option var maxSeconds = app.Option(“-mS|–maxSeconds”,”max seconds for the StartApp to run”,CommandOptionType.SingleOrNoValue); and the code for waiting is Process p = new Process() { StartInfo = pi }; //code var res=p.WaitForExit(this.MaxSeconds); //code if (res)…

  • SideCarCLI – Line interceptors

    For the SideCarCLI I have the concept of Line Interceptors. That means for each line from the original program another program will be start . The json looks like this “LineInterceptors”: [ { “Name”: “WindowsStandardWindowsOutputInterceptor”, “Arguments”: “/c echo \”{site} {line}\””, “FullPath”: “cmd.exe”, “FolderToExecute”: null, “InterceptOutput”: true }, { “Name”: “NextInterceptor”, “Arguments”: “/c echo {line}”, “FullPath”:…

  • SideCarCLI- finish interceptors

    The idea for FinishInterceptors is very simple – when the initial  process,StartApp,is finished –then run some other programs . And here comes some decisions: Pass the ExitCode of the StartApp ? ( YES) Pass the output lines of text of the StartApp ? ( NO  – could be enormous ) What to do if the…

  • SideCarCLI–refactor command line

    When starting to implement the project,suddenly realize that list interceptors command does not belong to  start app command . So the application should be refactored to new specifications – StartApp command – contains the whole list of commands for starting the app,including timer,adding interceptor – Interceptors command – should list the interceptors  (timer,line,finish) The interceptors…

  • SideCarCLI–Architecture and specs–part 2

    The SideCarCLI application should start another application and intercept in various ways .  What will execute when intercept is not known in advance – so should be read at runtime  . So the SideCarCLI will load the interceptors and make then available to the application. Let’s say that,for the moment,the SideCarCLI will take all the…

  • SideCarCLI | Command Line – description –part 1

    There are those days a great deal of command line applications that performs a variety of things. The problem is that you cannot control them . The command line performs their duty well – but,from time to time,you need something else integrated with this. The pattern for this is https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar – it is applied to…

  • Deploy .NET Core +SqlServer application to Ubuntu

    Tools used: SSH –  Windows Native DOS – Windows Native SSMS – download https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15 FileZilla – download https://filezilla-project.org/download.php?platform=win64 How I did : SSH : Install SqlServer: https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver15 SSMS: Copy database with SSMS export data DOS : Windows Compile application for Linux: dotnet publish -r linux-x64 Filezilla: Transfer with FileZilla all files: manual SSH -Change permission…