Search code examples
c#linuxwcf.net-coreservicestack

Web service on Linux


Post the question in a different way, because the previous one was closed because it was opinion-based. In the past I have developed several .NET applications that consumes WCF services hosted on IIS with MSSQL database. Now the company is asking me a technology switch (for licensing reasons - current MS server is getting old and needs to be replaced) and I have do do the same but with a Linux server, so I need that the same .NET applications to connect to this server to retrieve the data in the same way that they do now with MSSQL (service reference). So I need to rewrite the WCF service to a new technology that could be hosted in Linux. I know for sure that I have to learn a new technology to do that but I would like to be sure I choose the right one. These are my actual skills :

  • Writing C# code
  • Writing VB.NET code
  • SQL and MySQL
  • Some Python basics

This is what I have done so far :

  • Build a Linux test machine with Debian distro and installed Mono and .Net Core
  • Installed MariaDb database and built table schema

Do you think that ServiceStack could be a good choice to fit my needs? If so, what are the suggested steps to getting startet with it? Thanks!


Solution

  • Do you think that ServiceStack could be a good choice to fit my needs?

    So ServiceStack runs on .NET Core and Mono but you shouldn't consider Mono for Web Apps as .NET Core is far more performant, resilient & better supported.

    ServiceStack includes a code-first ORM in OrmLite that you can use to quickly develop DB Apps which supports MySql/MariaDB.

    ServiceStack also supports AutoQuery where it can implement full Queryable Services for your OrmLite data models with just a simple Typed Request DTO declaration.

    And in the pre-release version (now available from v5.8.1 on MyGet) it also supports AutoCrud and AutoGen AutoCrud Services which makes it possible to rapidly develop full CRUD APIs with declarative Request DTOs.

    All these features are supported and perform even better on .NET Core thanks to its leaner & faster runtime & thanks to its cross-platform support you can take advantage of the simpler & superior tools and Services for hosting & deployment in the Linux ecosystem.

    If so, what are the suggested steps to getting startet with it?

    I'd recommend following the Getting Started section and reading the Background Concept docs if you're new to ServiceStack to get a background understanding on its design & goals.