New version 220.127.116.11 of ADO.NET provider for Firebird is ready for download. Although I’m focusing mainly on version 6 of FirebirdClient now, immediate fixes and small improvements are still landing in 5.x version(s). This is a collection of these.
The Multisensor 6 from Aeotec is a nice little device. I have three of these in my house at the moment (and I’m sure I’m not done yet 😉). Being data geek I always calibrate the temperature (and humidity) sensor to match my own “calibration” devices (ESP-8266 with Si-7021). The steps described in official documentation are correct, but because I use OpenZWave (in Domoticz) I had to do some specific steps to make it work.
C# 7.1 comes with option to use asynchronous
Main method. That means now the
Main can have
async modifier and return any compatible type, i.e.
Task<int> for example. But how it works under the hood? Let’s find out.
If you read the documentation etc. for Azure CDN, it often expects that you’re going to use it on parts of your website and rest will be served directly from the original location. But if you have completely static (and currently running) website, like for example this blog, which is using the Azure CDN actually, you need to take a few specific steps to start using Azure CDN in such setup and without downtime.
Stejně jako .NET, Microsoft a techonologie kolem mají výbornou Gopas TechEd konferenci, má i Java svět svoji – JavaDays. Letos se uskuteční 13. – 14. listopadu a já jsem si připravil několik přednášek, které vás doufám zaujmou. Především kolem tématu databází, které je mi velmi blízké.
Just before the end of the week I have a toy for you for the weekend. Yes you see it correctly – Entity Framework Core 2.0 support for Firebird. And together with that preview of FirebirdClient 6.0, which contains heaps of changes as well.
Few months back I decided to play a little with asyncio in Python. Explore a little bit how “they did it” and align that in my mind with what I know about the implementation in .NET. Because at that time I needed some HTTP probing I decided to test the async IO together with regular HTTP (aka network) requests. And I used aiohttp. Not that I did some big research. I did quick search and looked at some demos to see whether I like how it’s structured or not. And aiohttp felt fine.
Creating script for migrations in command line is easy. Just execute
dotnet ef migrations script and you’re done. But what if you want to do this in the code?
If you want to use any national characters set (i.e.
windows-1250) on .NET Core, thus also with FirebirdClient, you need to do some extra steps.
I hate seeing
Count > 0 when doing code reviews. And I always recommend using
Any instead. It shows the intention, hence makes the code more readable, I think.
Although I would always choose readability over performance – unless in some very specific cases, with well-defined numbers – at one point I wondered whether there’s a cost in using
Any. Speed? Allocations?
Letošní CORESTART 2.0 (2. – 3. listopadu) naváže na loňskou “edici”, tentokrát samozřejmě se zaměřením na .NET Core 2.0 a všeho okolo něj. Verze 2.0 už opravdu něco umí a jde na ní solidně stavět. Kromě zahraničních speakerů, přispěji i já svou troškou do mlýna dvěma přednáškami – jedna kolem Entity Frameworku Core 2.0 a druhá kolem novinek v C# 7 a dál. Novinek je hodně a program stojí za to. Přijďte, nebudete litovat.
Gotcha inserting entities with explicit ID generated in database in Entity Framework Core 2 compared to Entity Framework 6
Yesterday I was rewriting some code from Entity Framework 6 to Entity Framework 2 for testing and discovered unexpected behavior. Luckily, the code fails, so it’s easy to detect.
I’m pretty sure you know what the red squiggle in Visual Studio means (correct, it’s the error). Very likely you know green squiggle (correct, it’s the warning). Maybe you know blue squiggle (correct, it’s the message). But do you know what purple squiggle means? By the way the official name for squiggle in Visual Studio is wavy underline.
Today I found a great new feature for debugging in Visual Studio. Maybe you know the Run to Cursor feature (if not, I’ll explain it in next paragraph), but did you know you can use the same feature from Call Stack as well?
During a break of my user group talk yesterday I got a question about how Entity Framework translates
Contains into an
IN clause. Whether it uses parameters and how it handles limits that SQL Server has around the parameter count.
Last couple of years I published this blog using Jekyll. Static pages are hard to beat in performance and security. Initially on GitHub pages, then GitLab Pages and eventually moving to Azure. Mainly because thanks to
web.config I have more control over the webserver (IIS) and I can do bit more (in fact quite a lot). But lately I started to be more and more tired of Jekyll. It was slow for me and given it’s a Ruby application and me not being fan nor fluent of Ruby it started to add up. For maybe a year I looked multiple times at Hugo, because it was an obvious choice and didn’t liked the templating structure. Also Pelican, because it’s written in Python and I like Python. Not sure why, but I didn’t convert to it. And I also played multiple times with the idea of writing something myself, just to dismiss that idea hundred times because I knew I would trap myself in constantly fiddling with it and burning my free time.
New version 18.104.22.168 of ADO.NET provider for Firebird is ready for download. This release is about .NET Standard 2.0. Now the .NET Standard 2.0, with all the new APIs supported, version is available (this work, together with upcoming Entity Framework Core 2.0 support, is sponsored by Integrative9).
Another new feature is support for passing key over the wire for encrypted databases (you need to have server side plugin for this feature, i.e. this from IBPhoenix). New connection string property
crypt key is available for that. The value is base64 encoded data representing the key. You can find small example in tests.
New version 22.214.171.124 of ADO.NET provider for Firebird is ready for download. Apart from regular bugfixes some new features are available. Notably,
FbTrace now supports new format of Firebird 3 and then
DefaultFbMigrationSqlGeneratorBehavior allows easier customization in case you want specific behavior for Entity Framework Migrations.
I was reading the announcement about Entity Framework Core 2 the other morning and saw “String interpolation in raw SQL methods” paragraph. This was already in preview(s) and I kind of took it as granted, not thinking about how it’s done or what it is doing. Not this time. Somehow my curiosity kicked in and I decided to create same feature and maybe do something with it.
Of course, I could peek into sources, but I decided to use the idea, but build it myself from scratch. I like the idea of using already existing feature from C# and then using for different, but reasonable, purpose. String interpolation and SQL parameters are exactly this.
Asynchronous stuff with
await in C# is great. But as with any other great tool, there are some gotchas that might cost you something (performance, memory, etc.). Today I’m going to talk about