public virtual ApiChainServerResponseModel MapEntityToModel( Chain item) { var model = new ApiChainServerResponseModel(); model.SetProperties(item.Id, item.ChainStatusId, item.ExternalId, item.Name, item.TeamId); if (item.ChainStatusIdNavigation != null) { var chainStatusIdModel = new ApiChainStatusServerResponseModel(); chainStatusIdModel.SetProperties( item.ChainStatusIdNavigation.Id, item.ChainStatusIdNavigation.Name); model.SetChainStatusIdNavigation(chainStatusIdModel); } if (item.TeamIdNavigation != null) { var teamIdModel = new ApiTeamServerResponseModel(); teamIdModel.SetProperties( item.TeamIdNavigation.Id, item.TeamIdNavigation.Name, item.TeamIdNavigation.OrganizationId); model.SetTeamIdNavigation(teamIdModel); } return(model); }
public virtual ApiChainStatusServerResponseModel MapServerRequestToResponse( int id, ApiChainStatusServerRequestModel request) { var response = new ApiChainStatusServerResponseModel(); response.SetProperties(id, request.Name); return(response); }
public virtual ApiChainStatusServerResponseModel MapEntityToModel( ChainStatus item) { var model = new ApiChainStatusServerResponseModel(); model.SetProperties(item.Id, item.Name); return(model); }