public virtual ApiCallAssignmentServerResponseModel MapServerRequestToResponse( int id, ApiCallAssignmentServerRequestModel request) { var response = new ApiCallAssignmentServerResponseModel(); response.SetProperties(id, request.CallId, request.UnitId); return(response); }
public virtual ApiCallAssignmentServerResponseModel MapEntityToModel( CallAssignment item) { var model = new ApiCallAssignmentServerResponseModel(); model.SetProperties(item.Id, item.CallId, item.UnitId); if (item.CallIdNavigation != null) { var callIdModel = new ApiCallServerResponseModel(); callIdModel.SetProperties( item.CallIdNavigation.Id, item.CallIdNavigation.AddressId, item.CallIdNavigation.CallDispositionId, item.CallIdNavigation.CallStatusId, item.CallIdNavigation.CallString, item.CallIdNavigation.CallTypeId, item.CallIdNavigation.DateCleared, item.CallIdNavigation.DateCreated, item.CallIdNavigation.DateDispatched, item.CallIdNavigation.QuickCallNumber); model.SetCallIdNavigation(callIdModel); } if (item.UnitIdNavigation != null) { var unitIdModel = new ApiUnitServerResponseModel(); unitIdModel.SetProperties( item.UnitIdNavigation.Id, item.UnitIdNavigation.CallSign); model.SetUnitIdNavigation(unitIdModel); } return(model); }