Esempio n. 1
0
 public void AddMessenger(ApiMessengerClientResponseModel item)
 {
     if (!this.Messengers.Any(x => x.Id == item.Id))
     {
         this.Messengers.Add(item);
     }
 }
        public virtual ApiMessengerClientRequestModel MapClientResponseToRequest(
            ApiMessengerClientResponseModel response)
        {
            var request = new ApiMessengerClientRequestModel();

            request.SetProperties(
                response.Date,
                response.FromUserId,
                response.MessageId,
                response.Time,
                response.ToUserId,
                response.UserId);
            return(request);
        }
        public virtual ApiMessengerClientResponseModel MapClientRequestToResponse(
            int id,
            ApiMessengerClientRequestModel request)
        {
            var response = new ApiMessengerClientResponseModel();

            response.SetProperties(id,
                                   request.Date,
                                   request.FromUserId,
                                   request.MessageId,
                                   request.Time,
                                   request.ToUserId,
                                   request.UserId);
            return(response);
        }