Question : This is strange in dbml designer Column name and Enttiy Name is different.

0
      

You know we are writing codes. on the other hand; we are changing DBML files if add or change database table. i droped my tables and added new tables. My DBML does not include new columns names. in My Database ENG_MAINWP_SELECTED_X is not the same as DBML this column ,n my dbml : ENG_MAINWP_SELECTED_X_

Why this strange behavior occurs? So Save method does not run How can i do that? if take column in server explorer and add dbml every thing must be the same...


LOOK THESE : http://i50.tinypic.com/2hozi1c.png

Answer : This is strange in dbml designer Column name and Enttiy Name is different.

select X.StockCode [topLevelPart], X.Qty [topQty],
      Coalesce(E.Component,D.Component,C.Component,B.Component,A.Component) [lowerLevelPart],
      ISNULL(E.QtyPer,1)*ISNULL(D.QtyPer,1)*ISNULL(C.QtyPer,1)*ISNULL(B.QtyPer,1)*ISNULL(A.QtyPer,1)*X.Qty [Qty]
from (
      SELECT InvMovements.StockCode AS StockCode, SUM(InvMovements.TrnQty) AS QTY
      FROM   InvMovements
      INNER JOIN InvMaster ON InvMovements.StockCode = InvMaster.StockCode
      WHERE (InvMovements.EntryDate BETWEEN CONVERT(DATETIME, '2010-05-31 00:00:00', 102)
                                                        AND CONVERT(DATETIME, '2010-06-27 00:00:00', 102))
        AND (InvMovements.TrnType = 'R') AND (InvMaster.ProductClass IN ('PDM', 'PRM', 'TM', 'PM'))
      GROUP BY InvMovements.StockCode
) X
inner join BOM A on A.ParentPart = X.StockCode
left join BOM B on B.ParentPart = A.Component
left join BOM C on C.ParentPart = B.Component
left join BOM D on D.ParentPart = C.Component
left join BOM E on E.ParentPart = D.Component
ORDER BY X.StockCode
Random Solutions  
 
programming4us programming4us