Ejemplo n.º 1
0
        public Task<UserMessage> Create(CreateUser createUser)
        {
            var user = new User
            {
                Age = createUser.Age,
                Name = createUser.Name
            };
            _burrow.InitWorkSpace();
            try
            {
                _userRepository.Save(user);
            }
            catch (Exception ex)
            {
            }

            _burrow.CloseWorkSpace();
            return Task.FromResult(new UserMessage()
            {
                Name = user.Name,
                Age = user.Age,
                Id = user.Id
            });
        }
Ejemplo n.º 2
0
 public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream)
 {
     DTO.CreateUser result = new DTO.CreateUser();
     result.Age = ((int)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(int), stream)));
     result.Name = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream)));
     return result;
 }
Ejemplo n.º 3
0
 public async Task<UserMessage> CreateUser(CreateUser createUser)
 {
     
     return await _userPresenter.Create(createUser);
 }
Ejemplo n.º 4
0
 public static object DeepCopier(object original)
 {
     DTO.CreateUser input = ((DTO.CreateUser)(original));
     DTO.CreateUser result = new DTO.CreateUser();
     Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
     result.Age = input.Age;
     result.Name = input.Name;
     return result;
 }