public virtual ApiLinkLogServerResponseModel MapEntityToModel( LinkLog item) { var model = new ApiLinkLogServerResponseModel(); model.SetProperties(item.Id, item.DateEntered, item.LinkId, item.Log); if (item.LinkIdNavigation != null) { var linkIdModel = new ApiLinkServerResponseModel(); linkIdModel.SetProperties( item.LinkIdNavigation.Id, item.LinkIdNavigation.AssignedMachineId, item.LinkIdNavigation.ChainId, item.LinkIdNavigation.DateCompleted, item.LinkIdNavigation.DateStarted, item.LinkIdNavigation.DynamicParameters, item.LinkIdNavigation.ExternalId, item.LinkIdNavigation.LinkStatusId, item.LinkIdNavigation.Name, item.LinkIdNavigation.Order, item.LinkIdNavigation.Response, item.LinkIdNavigation.StaticParameters, item.LinkIdNavigation.TimeoutInSeconds); model.SetLinkIdNavigation(linkIdModel); } return(model); }
public virtual ApiLinkServerResponseModel MapEntityToModel( Link item) { var model = new ApiLinkServerResponseModel(); model.SetProperties(item.Id, item.AssignedMachineId, item.ChainId, item.DateCompleted, item.DateStarted, item.DynamicParameters, item.ExternalId, item.LinkStatusId, item.Name, item.Order, item.Response, item.StaticParameters, item.TimeoutInSeconds); if (item.AssignedMachineIdNavigation != null) { var assignedMachineIdModel = new ApiMachineServerResponseModel(); assignedMachineIdModel.SetProperties( item.AssignedMachineIdNavigation.Id, item.AssignedMachineIdNavigation.Description, item.AssignedMachineIdNavigation.JwtKey, item.AssignedMachineIdNavigation.LastIpAddress, item.AssignedMachineIdNavigation.MachineGuid, item.AssignedMachineIdNavigation.Name); model.SetAssignedMachineIdNavigation(assignedMachineIdModel); } if (item.ChainIdNavigation != null) { var chainIdModel = new ApiChainServerResponseModel(); chainIdModel.SetProperties( item.ChainIdNavigation.Id, item.ChainIdNavigation.ChainStatusId, item.ChainIdNavigation.ExternalId, item.ChainIdNavigation.Name, item.ChainIdNavigation.TeamId); model.SetChainIdNavigation(chainIdModel); } if (item.LinkStatusIdNavigation != null) { var linkStatusIdModel = new ApiLinkStatusServerResponseModel(); linkStatusIdModel.SetProperties( item.LinkStatusIdNavigation.Id, item.LinkStatusIdNavigation.Name); model.SetLinkStatusIdNavigation(linkStatusIdModel); } return(model); }
public virtual ApiLinkServerResponseModel MapServerRequestToResponse( int id, ApiLinkServerRequestModel request) { var response = new ApiLinkServerResponseModel(); response.SetProperties(id, request.AssignedMachineId, request.ChainId, request.DateCompleted, request.DateStarted, request.DynamicParameters, request.ExternalId, request.LinkStatusId, request.Name, request.Order, request.Response, request.StaticParameters, request.TimeoutInSeconds); return(response); }