示例#1
0
        public static Client CreateEntity(DTO.ClientDto model)
        {
            if (model == null)
            {
                return(null);
            }

            var entity = new Client()
            {
                ClientId  = model.ClientId ?? 0,
                LastName  = model.LastName,
                FirstName = model.FirstName
            };

            return(entity);
        }
示例#2
0
        public static DTO.ClientDto CreateModel(Client entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new DTO.ClientDto()
            {
                FirstName = entity.FirstName,
                LastName  = entity.LastName,
                ClientId  = entity.ClientId
            };

            return(model);
        }