One of the cool features of PostgreSQL is in-database enumeration types. With Entity Framework Core 2.1 and the latest Npgsql packages these become (almost) first class types in EF. I say almost because migrations can only create enumerations, any changes have to be manually added to the migrations. My personal project ended up with multiple EF contexts. No real reason, it just ended up like that. Following the Npgsql documentation I used a class static constructor to map the enumerations to Npgsql

I’m back, after a short break and much swearing at third party libraries. I was going to use React.NET as that bundles up all the things required, but it has too many opinions about how you call your React components. Since I’m using Redux an react-router this makes most of the code redundant, so I went back to using the raw components. Additionally, I switched from V8 to using Microsoft’s Chakra runtime because the existing V8 interop libraries do not support .

The Web UI

Time for the web UI! I’m building this using ASP.NET 5 and ASP.NET MVC 6 for the controller side and React, Redux, Immutable and TypeScript for the view layer. I’m not a fan of node.js, but I do like the web view being defined in one place so running React on the server side appeals to me. I could run it fully in the browser but servers tend to be faster than clients, especially mobile clients.

Api controllers

The backend Api servers are going to use the WebAPI component of ASP.NET 5 to make a RESTful api. Since I’m using entity framework for the database layer this is a remarkably simple piece of code, especially since most of it will be automatically generated. Right now I’ll focus on the basic create/read/update/delete (CRUD) methods, later on I’ll get to some more interesting logic when it’s time for automatic transaction posting and budget forecasting.

I promised code, so it’s time to get coding! I’m going to start with the api server, then implement the UI on top of that. The backend is going to be built using ASP.NET 5 and WebAPI for the web layer. The database is going to be sqlite and I’ll be using Entity Framework 7 for the database access layer. These choices are mostly because they’re the defaults in ASP.NET, but I don’t have much experience with Entity Framework so it’s a great opportunity to learn.

I don’t like deciding too much up front, but understanding what you’re trying to do helps. I tend to focus more on the logic side rather than the UI - since I’m not that great at UI work - so I’ll start from the data model and work up. What I want out of this To figure out the data model I need to figure out what I want out of this.


Super bio with markdown support COOL

New Zealand