protected int Update(TEntity entity, PrimaryKey pk)
        {
            int rows = 0;

            try
            {
                if (!dbc.IsOpen)
                {
                    dbc.Open();
                }

                rows = dbc.Update <TEntity>(entity, pk);
            }
            catch (Exception ex)
            {
                logger.LogError(ex.Message);
            }

            logger.LogInformation($"Update complete for {typeof(TEntity)} entity.");

            return(rows);
        }