コード例 #1
0
ファイル: QueryMap.cs プロジェクト: PapLabros/CeidDiplomatiki
        /// <summary>
        /// Creates and returns a <see cref="QueryMapDataModel"/> from the current <see cref="QueryMap"/>
        /// </summary>
        /// <returns></returns>
        public QueryMapDataModel ToDataModel() => new QueryMapDataModel()
        {
            Id          = Id,
            DatabaseId  = DatabaseOptions.Id,
            TableNames  = Tables.Select(x => x.TableName).ToArray(),
            Joins       = Joins.Select(x => x.ToDataModel()).ToArray(),
            Color       = Color,
            Description = Description,
            Name        = Name,

            // Set the column maps
            PropertyMaps = PropertyMaps.Select(x => x.ToDataModel()).ToArray(),

            // Set the data grid presenter maps
            DataGridPresenterMaps = DataGridPresenterMaps.Select(x => x.ToDataModel()).ToArray(),
        };