public void Post([FromBody] DTO.Client client)
        {
            Console.WriteLine($"DEBUG: Entering {nameof(Post)}");
            Console.WriteLine($"DEBUG: Request body contained: {client}");
            // TODO: updatedBy
            var updatedBy = "SYSTEM";

            using (var db = new TransactionServiceDbContext())
            {
                var dbClient = db.Clients.FindAsync(client.ClientId).Result;
                if (dbClient == null)
                {
                    // PK is serial, so should be automatically generated
                    dbClient = new Domain.Entities.Client
                    {
                        CreatedBy = updatedBy,
                        CreatedOn = DateTime.UtcNow
                    };
                    db.Add(dbClient);
                }
                dbClient.Name        = client.Name;
                dbClient.Description = client.Description;
                dbClient.UpdatedBy   = updatedBy;
                dbClient.UpdatedOn   = DateTime.UtcNow;
                db.SaveChangesAsync();
            }
        }
        public ActionResult <DTO.Client> Get(int id)
        {
            DTO.Client client;

            using (var db = new TransactionServiceDbContext())
            {
                client = db.Clients
                         .Where(c => !c.Deleted &&
                                c.ClientId == id)
                         .Select(c => c.toDto())
                         .FirstOrDefault();
            }

            if (client == null)
            {
                client = new DTO.Client
                {
                    ClientId    = -1,
                    Name        = "<name>",
                    Description = "<description>"
                };
            }

            return(client);
        }