SQL Server supports exporting data-tier applications (BACPAC). It means that database is packaged to one file with schema and data. It’s not same as SQL Server backups but to backup sm… Read More
Blog Directory > Technology Blogs > Gunnar Peipman - Programming Blog technology Blog >
Gunnar Peipman - Programming Blog Blog
1
Tags:
ASP.NET, Entity Framework, SQL Server, Azure, Office 365 - Code samples, writings, problems and solutions.
One of the new features in .NET 6 and C¤ 10 is support for global usings. We can define using declarations as global and they work all over the project so we don’t have to defin… Read More
Hopefully the era of leprosy and corona is over for this time and it’s time to get back to blogging. Exceptions are powerful feature of object-oriented languages as far as they are use… Read More
During moving one system from classic ASP.NET MVC to ASP.NET Core I faced an interesting challenge. Although access to system is based on Active Directory there is separate role management b… Read More
Although .NET 5 is officially in RC and not yet officially supported on Azure cloud we can still deploy ASP.NET Core web applications built for .NET 5 to Azure App Services. I made my first… Read More
My fellow MVP Jiří Činčura wrote a nice blog post about hosting ASP.NET Core applications on Azure B-series small virtual machines: Running ASP.NET Core app on Azure B1… Read More
My previous post about Surface Go 2 was brief introduction based on my own experiences after one month of using it. Surface Go 2 is lightweight machine with limited hardware resources. It&rs… Read More
I decided to isolate Azure storage account behind this blog due to growing number of attacks against this little nice reading corner. I have anyway Azure CDN service enabled and it is perfec… Read More
C# 9.0 comes with nice new feature called top-level programs. It’s something that teachers of beginner classes will love for sure. Imagine – you start teaching C# with only two l… Read More
When working with stateless sessions in NHibernate we need some way to see generated SQL but we cannot use simple tricks as custom NHibernate interceptor to log SQL queries. As I’m usi… Read More
Logging down SQL created by ORM is useful when debugging new features of application. SQL logging in NHibernate is a little bit tricky and not so straightforward as it is with Entity Framewo… Read More
Dependency Injection (DI) was also supported by classic ASP.NET MVC but there was no framework-level dependency injection like in ASP.NET Core. In this blog post I will show how to use Struc… Read More
On the search for running development environments on cloud I stumbled upon service calles Visual Studio Codespaces. It’s nice service that moves development and debugging workloads to… Read More
Recently I bought Surface Go 2 tablet with Intel M3 CPU and LTE. Surface Go 2 is hybrid device being either tablet or small laptop. It is lightweight and therefore not the option for resourc… Read More
A little surprise during COVID-19 time coding. I cloned repo to my dev box, opened it in Visual Studio and hit F5. IIS Express starts and browser opens but it shows just error about site to… Read More
Something funny to end this week. When checking my Twitter feeds I found a kinky tweet about logging .NET Core messages to Notepad window. Yes, you heard right – .NET Core logger for N… Read More
During Build 2020 Microsoft announced preview of Azure Static Web App service – app hosting offering for static web applications built on JavaScript. Automatic deployments to productio… Read More
Yesterday Microsoft announced .NET Multi-platform App UI (MAUI) – the effort to turn Xamarin Forms apps use single cross-platform code-base targeting multiple platforms. Demos from Bui… Read More
During lockdown I tried out how Azure Front Door works. It is another member of Azure load balancers and traffic routers world but it is global and designed for web applications. My only int… Read More
Times ago I blogged about micro ORM-s. I have been busy through all Covid-19 times learning technical side of DDD and during that I met again my old friend Dapper. There are applications whe… Read More
One nice feature that NHibernate has is future results. It is technically a capability to put queries on hold until data is actually asked. When data is asked from one delayed query then all… Read More
Some properties of model classes come as enums and we want to show enum values in select list when edit form is opened. Sometimes we want enum element names but sometimes we want to use cust… Read More
Entity Framework Core 5.0 comes with SQL-based brother to ToString() method for LINQ-queries. This method is called ToQueryString() and it returns provider-specific SQL without connecting to… Read More
Using query string in controller unit tests is actually easy until we don’t need anything more advanced. We can buld up a string with query parameters and go with it. But what if thing… Read More
Visual Studio database projects have been one of my important tools since Visual Studio 2010. Database projects were not easy to use with build servers ten years ago. Today things are differ… Read More
Using Azure fluent API-s it is easy to create storage accounts and blob containers. After experimenting with fluent API of Azure storage I found it to be good match for multitenant web appl… Read More
I discovered lately one killer feature of SQL Server – keeping data and log files on Azure blob storage. There are scenarios where we may want to go with blob storage instead of buying… Read More
My previous blog post Querying MySQL from SQL Server using linked server introduced how to link MySQL database to MSSQL and how to write queries that gather data from local and linked server… Read More
SQL Server has interesting feature calles Linked Servers. It’s about linking other databases to SQL Server and using their data like it’s local. There are many powerful open-sour… Read More
My last bold statement was that we don’t need custom unit of work and repository classes with Entity Framework Core. One issue remained unsolved and it was querying part of repositorie… Read More
After getting done with Blazor desktop applications I tried to build kind of hybrid Blazor WebAssembly application that can run on desktop and in web equally. Although I failed to make it as… Read More
Blazor on desktop is one of latest hot topics and .NET Conf: Focus on Blazor only added more fuel to fire. Blazor seems to come everywhere and it’s unstoppable. One of interesting desk… Read More
Surface Neo and Surface Duo are new devices by Microsoft, planned to launch for holidays season this year. Surface Neo runs Windows and Surface Duo is based on Android. For Surface Duo there… Read More
Multitenant wep applications detect current tenant usually by URL checking name of first level folder or subdomain. Usually tenants are defined by subdomain as it is easier to distribute the… Read More
After getting fake authenticated user to ASP.NET Core integration tests I made step further and introduced the way to use different user accounts. Using multiple users and roles instead of o… Read More
Over years I have written many blog posts about C# and .NET that demonstrate also how things work internally and what C# compiler produces from the code we write. I have called these chapter… Read More
Microsoft made very interesting announcements at .NET Conf: Focus on Blazor online conference. There are many great things are happening and Blazor is also making a fast progress on finding… Read More
After getting done with fake users for ASP.NET Core controller unit tests I wanted to make fake users available also in integration tests. It took some inventing and hacking but I made it wo… Read More
I think most of ASP.NET Core applications have authentication enabled. When writing unit tests for controllers we have one set of tests that need authenticated user and other set of tests th… Read More
Last year I had some projects where I had to embed Power BI reports to ASP.NET Core applications. There were easy cases that solved practically with copy-paste but I also had more complex si… Read More
In one of my projects I have some ASP.NET Core views that display multiple tables with reporting data. Data comes from SQL Server views and stored procedures and these can be modified in dat… Read More
I have never seen a real-life project where object-relational mapper generates 100% of needed SQL. There have always been those special cases when raw SQL commands are needed. In this post I… Read More
First of all – thanks to all my blog readers to be here with me. Last year was the one where the most important metric of blogs – number of page views – made its yearly rec… Read More
I got back to active SharePoint and CSOM development some months ago and first thing to do was to port bunch of workflows from in-prem SharePoint to cloud. Where I live we don’t usuall… Read More
I’m building build and release pipeline on Azure DevOps for one of my projects. We want to automate testing and deployments to staging environment. At staging environment we want to us… Read More
There’s one very useful and often overlooked operator in C#. It’s called nameof and its purpose is to return name of something. Although it is operator we can live without it may… Read More
I know there are advanced tools like SQL Server Profiler and NHibernate Profiler but often I want to see NHibernate queries just in debug window to have overview of what’s going on. It… Read More
My previous posts about tenant-based dependency injection and using composite command in ASP.NET Core culminated with idea to use configurable composite commands in multi-tenant ASP.NET Core… Read More
Windows Forms is coming to .NET Core and last version of Visual Studio 2019 Preview comes with form designer built in. There are basic controls available in toolbox but not all out-of-box co… Read More
One need in multitenant applications is injecting dependencies based on tenant configuration. It can be actually more complex as instances may need constructor parameters. Here is my example… Read More
Modeling employees seems to be easy when we get started but it quickly turns more complex than we first expect. Specially if we need good and flexible model we don’t have to replace ti… Read More
After my first experiments with Query Specification pattern on Entity Framework Core I came to interesting idea – why not using extension methods that wrap query specifications or add… Read More
My previous blog post No need for repositories and unit of work with Entity Framework Core showed how Repository and Unit of Work patterns are already implemented in Entity Framework Code (a… Read More
After working again on codebase where Entity Framework Core was used through repository and unit of work patterns I decided to write eye-opener post for next (and maybe even current and prev… Read More
ASP.NET Core supports gRPC protocol that is about to replace legacy SOAP services with more performant and powerful protocol that is easier to use and support. This blog post shows how to bu… Read More
My introduction to composite command pattern was more theoretical and focused to high-level details. This blog post focuses on implementation details and introduces how to use composite comm… Read More
Future versions of Blazor will support cascading data annotations support meaning that validation of child components is also supported. First experimental bits were released counted hours a… Read More
I thought first my ASP.NET Core edition of Hello, Blinky will be my last Hello, Blinky for long time. But then something reminded me of Blazor and I thought why not build Blazor editio… Read More
Just wrote down something I had to went through with students in one of my classes – making file uploads work in ASP.NET Core application. Here are samples of single and multiple file… Read More
I have previously blogged about command pattern and composite pattern. I had some projects where I succesfully mixed these two together to compose a composite command. It’s a construct… Read More
Next .NET Core version 3.1 brings some good news to Blazor – partial page classes. Maybe it’s not so big thing for many guys out there but sure great feature for those who like c… Read More
ASP.NET Core 3.0 applications doesn’t build views automatically by default when changes are made. Views are built when application compiles and this is expected final state for views… Read More
With Visual Studio 2019 we can publish ASP.NET Core 3.0 applications as self-contained executable. It’s specially useful for environments where ASP.NET Core 3.0 is not installed or whe… Read More
Once upon a time I worked out simple file client generalization so my applications can keep files on local machine or somewhere on the cloud without changes in application code. This blog po… Read More
Coming to cloud with web application can be scary if it’s the first time you do it. Azure cloud is not anymore about dozen of services – it’s real monster offering more tha… Read More
.NET Conf 2019 was full of great news and interesting pieces of information for those who love .NET world like me. It was specially interesting for me to watch presentation The Future of Bla… Read More
So, what is IDisposable and what is disposing of objects? This is something I teach to developers classes before they are going to their first school practice at some company. One of importa… Read More
Do you have lightweight laptop with not very big laptop where you run Visual Studio? Do you need sometimes more space? You can make some free space if you remove .NET Core versions installed… Read More
Back in time I wrote series of posts about how I built simple object to object mapper. It was nine years ago and from them more things have changed. Today I added one new implementation of m… Read More
NHibernate has been my favorite ORM for long time. Although it’s more complex for beginners than Entity Framework it’s more matured and many developers consider it to be practial… Read More
Azure Cognitive Services is set of powerful and intelligent cloud services to analyze photos and images. This blog post shows how to create smart thumbnails using Azure cognitive services an… Read More
Azure CDN is one of Azure services that doesn’t provide charts and metrics in service overview page. For me these charts are important because they help me to optimize delivery of my b… Read More
I found temporary cross-platform solution for .NET Core to read system memory metrics until framework level libraries appear. This blog post shows how to build ASP.NET Core health check for… Read More
Until .NET Core gets its own cross-platform system metrics support I needed something simple to get system memory metrics of servers where ASP.NET Core application is running. I wasn’t… Read More
Building fully static web sites and blogs is possible anno domini 2019 and I tried out how it works using Jekyll and Azure services. My goal as a tech guy was keeping things small and automa… Read More
Before setting up Jekyll build and release pipelines on Azure DevOps we need static website service on Azure. It’s special feature of blob storage. This blog post shows how to set up a… Read More
We have Git repository and Azure static website set up. It’s time to connect these two with Jekyll build and release pipelines to automate publishing from our machine to static website… Read More
Previous post in series focused on setting up Jekyll build pipeline. After successful build we have new version of blog waiting for publishing in build artifacts folder. This post shows how… Read More
Our Jekyll blog is published to Azure static website automatically using Jekyll build and release pipelines. We can access site through Azure storage URL. To go live we want to use custom do… Read More
Client-side Blazor supports DataAnnotations form validation out of box. It’s simple and intuitive but also very flexible – if needed we can use the same mechanism to replace Data… Read More
.NET Core 3.0 comes with support for self-contained executables. It means we can publish applications as a single executable for specified platform. Also trimming – removing of unused… Read More
After finishing my writing about ASP.NET Core health checks I started finding a way how to visual health check results so I can display these on the wall mounted TV or big screen. This blog… Read More
Azure Functions V2 supports ASP.NET Core like dependency injection. It is specially good if we write functions that are wrappers for shared libraries and components we are also using in web… Read More
It’s time to get back to old era of this blog and bring my vCard action result to today’s ASP.NET Core world. There’s also support for images so we can provide really good… Read More