示例#1
0
        public virtual ApiOrganizationServerResponseModel MapServerRequestToResponse(
            int id,
            ApiOrganizationServerRequestModel request)
        {
            var response = new ApiOrganizationServerResponseModel();

            response.SetProperties(id,
                                   request.Name);
            return(response);
        }
        public virtual ApiOrganizationServerResponseModel MapEntityToModel(
            Organization item)
        {
            var model = new ApiOrganizationServerResponseModel();

            model.SetProperties(item.Id,
                                item.Name);

            return(model);
        }
示例#3
0
        public virtual ApiTeamServerResponseModel MapEntityToModel(
            Team item)
        {
            var model = new ApiTeamServerResponseModel();

            model.SetProperties(item.Id,
                                item.Name,
                                item.OrganizationId);
            if (item.OrganizationIdNavigation != null)
            {
                var organizationIdModel = new ApiOrganizationServerResponseModel();
                organizationIdModel.SetProperties(
                    item.OrganizationIdNavigation.Id,
                    item.OrganizationIdNavigation.Name);

                model.SetOrganizationIdNavigation(organizationIdModel);
            }

            return(model);
        }