public virtual ApiOfficerCapabilitiesServerResponseModel MapEntityToModel( OfficerCapabilities item) { var model = new ApiOfficerCapabilitiesServerResponseModel(); model.SetProperties(item.Id, item.CapabilityId, item.OfficerId); if (item.CapabilityIdNavigation != null) { var capabilityIdModel = new ApiOffCapabilityServerResponseModel(); capabilityIdModel.SetProperties( item.CapabilityIdNavigation.Id, item.CapabilityIdNavigation.Name); model.SetCapabilityIdNavigation(capabilityIdModel); } if (item.OfficerIdNavigation != null) { var officerIdModel = new ApiOfficerServerResponseModel(); officerIdModel.SetProperties( item.OfficerIdNavigation.Id, item.OfficerIdNavigation.Badge, item.OfficerIdNavigation.Email, item.OfficerIdNavigation.FirstName, item.OfficerIdNavigation.LastName, item.OfficerIdNavigation.Password); model.SetOfficerIdNavigation(officerIdModel); } return(model); }
public virtual ApiOffCapabilityServerResponseModel MapServerRequestToResponse( int id, ApiOffCapabilityServerRequestModel request) { var response = new ApiOffCapabilityServerResponseModel(); response.SetProperties(id, request.Name); return(response); }
public virtual ApiOffCapabilityServerResponseModel MapEntityToModel( OffCapability item) { var model = new ApiOffCapabilityServerResponseModel(); model.SetProperties(item.Id, item.Name); return(model); }