public IDictionary <string, object> GetLocationDynamic(
            LocationQueryRow row, LocationQueryProjection projection,
            LocationQueryOptions options)
        {
            var obj = new Dictionary <string, object>();

            foreach (var f in projection.GetFieldsArr())
            {
                switch (f)
                {
                case LocationQueryProjection.INFO:
                {
                    var entity = row.Location;
                    obj["id"]          = entity.Id;
                    obj["code"]        = entity.Code;
                    obj["name"]        = entity.Name;
                    obj["address"]     = entity.Address;
                    obj["description"] = entity.Description;
                    obj["archived"]    = entity.Archived;
                }
                break;

                case LocationQueryProjection.SELECT:
                {
                    var entity = row.Location;
                    obj["id"]   = entity.Id;
                    obj["code"] = entity.Code;
                    obj["name"] = entity.Name;
                }
                break;
                }
            }
            return(obj);
        }
        private LocationQueryRow ProcessMultiResults(DynamicSql query, object[] objs)
        {
            var row = new LocationQueryRow();

            for (var i = 0; i < query.MultiResults.Count; i++)
            {
                var r = query.MultiResults[i];
                switch (r.Key)
                {
                case LocationQueryProjection.INFO:
                case LocationQueryProjection.SELECT:
                    row.Location = objs[i] as Location; break;
                }
            }
            return(row);
        }