public virtual ApiUnitOfficerServerResponseModel MapEntityToModel( UnitOfficer item) { var model = new ApiUnitOfficerServerResponseModel(); model.SetProperties(item.Id, item.OfficerId, item.UnitId); 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); } if (item.UnitIdNavigation != null) { var unitIdModel = new ApiUnitServerResponseModel(); unitIdModel.SetProperties( item.UnitIdNavigation.Id, item.UnitIdNavigation.CallSign); model.SetUnitIdNavigation(unitIdModel); } return(model); }
public virtual ApiVehicleOfficerServerResponseModel MapEntityToModel( VehicleOfficer item) { var model = new ApiVehicleOfficerServerResponseModel(); model.SetProperties(item.Id, item.OfficerId, item.VehicleId); 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); } if (item.VehicleIdNavigation != null) { var vehicleIdModel = new ApiVehicleServerResponseModel(); vehicleIdModel.SetProperties( item.VehicleIdNavigation.Id, item.VehicleIdNavigation.Name); model.SetVehicleIdNavigation(vehicleIdModel); } return(model); }
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 ApiOfficerServerResponseModel MapEntityToModel( Officer item) { var model = new ApiOfficerServerResponseModel(); model.SetProperties(item.Id, item.Badge, item.Email, item.FirstName, item.LastName, item.Password); return(model); }
public virtual ApiOfficerServerResponseModel MapServerRequestToResponse( int id, ApiOfficerServerRequestModel request) { var response = new ApiOfficerServerResponseModel(); response.SetProperties(id, request.Badge, request.Email, request.FirstName, request.LastName, request.Password); return(response); }
public virtual ApiNoteServerResponseModel MapEntityToModel( Note item) { var model = new ApiNoteServerResponseModel(); model.SetProperties(item.Id, item.CallId, item.DateCreated, item.NoteText, item.OfficerId); 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.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); }