Beispiel #1
0
 public static TModel FromDashboardTile <TModel>(DashboardTile dashboardTile) where
 TModel : DashboardTileApiModel, new() => new TModel
 {
     Id          = dashboardTile.Id,
     TenantId    = dashboardTile.TenantId,
     Name        = dashboardTile.Name,
     Width       = dashboardTile.Width,
     Height      = dashboardTile.Height,
     Top         = dashboardTile.Top,
     Left        = dashboardTile.Left,
     TileId      = dashboardTile.TileId,
     DashboardId = dashboardTile.DashboardId,
     Tile        = TileApiModel.FromTile(dashboardTile.Tile)
 };
        public static TModel FromDashboardTile <TModel>(DashboardTile dashboardTile) where
        TModel : DashboardTileApiModel, new()
        {
            var model = new TModel();

            model.Id          = dashboardTile.Id;
            model.TenantId    = dashboardTile.TenantId;
            model.Name        = dashboardTile.Name;
            model.DashboardId = dashboardTile.DashboardId;
            model.TileId      = dashboardTile.TileId;
            model.Top         = dashboardTile.Top;
            model.Left        = dashboardTile.Left;
            model.Width       = dashboardTile.Width;
            model.Height      = dashboardTile.Height;
            model.Tile        = TileApiModel.FromTile(dashboardTile.Tile);
            return(model);
        }