Add user to position + fix few things
This commit is contained in:
@@ -257,7 +257,7 @@ public static class MongoMappers
|
||||
MoneyManagement = Map(position.MoneyManagement),
|
||||
Initiator = position.Initiator,
|
||||
Ticker = position.Ticker,
|
||||
User = position.User != null ? Map(position.User) : null
|
||||
User = Map(position.User)
|
||||
};
|
||||
|
||||
if (position.StopLoss != null)
|
||||
@@ -294,8 +294,8 @@ public static class MongoMappers
|
||||
|
||||
public static Position Map(PositionDto dto)
|
||||
{
|
||||
var position = new Position(dto.AccountName, originDirection: dto.OriginDirection, dto.Ticker,
|
||||
Map(dto.MoneyManagement), dto.Initiator, dto.Date)
|
||||
var position = new Position(dto.Identifier, dto.AccountName, originDirection: dto.OriginDirection, dto.Ticker,
|
||||
Map(dto.MoneyManagement), dto.Initiator, dto.Date, Map(dto.User))
|
||||
{
|
||||
Open = new Trade(date: dto.Open.Date, direction: dto.Open.Direction, status: dto.Open.Status,
|
||||
tradeType: dto.Open.TradeType, ticker: dto.Open.Ticker, quantity: dto.Open.Quantity,
|
||||
@@ -305,7 +305,7 @@ public static class MongoMappers
|
||||
Status = dto.Status,
|
||||
SignalIdentifier = dto.SignalIdentifier,
|
||||
Identifier = dto.Identifier,
|
||||
User = dto.User != null ? Map(dto.User) : null
|
||||
User = Map(dto.User)
|
||||
};
|
||||
|
||||
if (dto.StopLoss != null)
|
||||
|
||||
Reference in New Issue
Block a user