public virtual ApiAdminServerResponseModel MapEntityToModel( Admin item) { var model = new ApiAdminServerResponseModel(); model.SetProperties(item.Id, item.Email, item.FirstName, item.LastName, item.Password, item.Phone, item.Username); return(model); }
public virtual ApiAdminServerResponseModel MapServerRequestToResponse( int id, ApiAdminServerRequestModel request) { var response = new ApiAdminServerResponseModel(); response.SetProperties(id, request.Email, request.FirstName, request.LastName, request.Password, request.Phone, request.Username); return(response); }
public virtual ApiVenueServerResponseModel MapEntityToModel( Venue item) { var model = new ApiVenueServerResponseModel(); model.SetProperties(item.Id, item.Address1, item.Address2, item.AdminId, item.Email, item.Facebook, item.Name, item.Phone, item.ProvinceId, item.Website); if (item.AdminIdNavigation != null) { var adminIdModel = new ApiAdminServerResponseModel(); adminIdModel.SetProperties( item.AdminIdNavigation.Id, item.AdminIdNavigation.Email, item.AdminIdNavigation.FirstName, item.AdminIdNavigation.LastName, item.AdminIdNavigation.Password, item.AdminIdNavigation.Phone, item.AdminIdNavigation.Username); model.SetAdminIdNavigation(adminIdModel); } if (item.ProvinceIdNavigation != null) { var provinceIdModel = new ApiProvinceServerResponseModel(); provinceIdModel.SetProperties( item.ProvinceIdNavigation.Id, item.ProvinceIdNavigation.CountryId, item.ProvinceIdNavigation.Name); model.SetProvinceIdNavigation(provinceIdModel); } return(model); }