public void AddMessenger(ApiMessengerResponseModel item) { if (!this.Messengers.Any(x => x.Id == item.Id)) { this.Messengers.Add(item); } }
public virtual ApiMessengerRequestModel MapResponseToRequest( ApiMessengerResponseModel response) { var request = new ApiMessengerRequestModel(); request.SetProperties( response.Date, response.FromUserId, response.MessageId, response.Time, response.ToUserId, response.UserId); return(request); }
public virtual ApiMessengerResponseModel MapRequestToResponse( int id, ApiMessengerRequestModel request) { var response = new ApiMessengerResponseModel(); response.SetProperties(id, request.Date, request.FromUserId, request.MessageId, request.Time, request.ToUserId, request.UserId); return(response); }