I see.
I'm using LLBLGen in a C/S application.
----------------Client Side---------------------
BussBorrowEntity b = new BussBorrowEntity(1586);
b = LLBLServiceManager.FetchEntity(b) as BussBorrowEntity;
b.Fields[(int)BussBorrowFieldIndex.BorrowTime].ExpressionToApply = new DbFunctionCall("getmydate", null);
b.Fields[(int)BussBorrowFieldIndex.BorrowTime].IsChanged = true;
b.IsDirty = true;
LLBLServiceManager.SaveEntity(b);
------------Server Side--------------------
public class LLBLService : BLServiceBase, ILLBLService
{
public static bool SaveEntity(CommonEntityBase entity)
{
DataAccessAdapter adapter = new DataAccessAdapter();
return adapter.SaveEntity(entity, true, true);
}
}
It doesn't work.
When I monitor the code in Server Side.The "ExpresionToApplay" of field "BorrowTime" is null. I think when pass the entity from client side to server side,the property is ignored.
but when i use LLBLGen in Server Side only.It get work
-------------------Server Side Only--------------------------
BussBorrowEntity b = new BussBorrowEntity(1586);
DataAccessAdapter adapter = new DataAccessAdapter();
adapter.FetchEntity(b);
b.Fields[(int)BussBorrowFieldIndex.BorrowTime].ExpressionToApply = new DbFunctionCall("getmydate", null);
b.Fields[(int)BussBorrowFieldIndex.BorrowTime].IsChanged = true;
b.IsDirty = true;
adapter.SaveEntity(b,true,true);
Anyone has the solution?