Esempio n. 1
0
        public User Insert(User user)
        {
            var factory = FactoryProvider.GetDataFactory();
            var repository = factory.CreateUserRepository();

            return repository.Insert(user);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var factory = new ChannelFactory<SimplesEService.ICoreService>("WSHttpBinding_ICoreService");

            var channel = factory.CreateChannel();

            User newUser = new User();

            var result = channel.InsertUser(newUser);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("iniciando");

            var factory = new ChannelFactory<SimplesEService.ICoreService>("WSHttpBinding_ICoreService");

            var channel = factory.CreateChannel();

            User newUser = new User();
            newUser.Name = DateTime.Now.Second.ToString();

            var result = channel.InsertUser(newUser);

            Console.WriteLine(result.Completed);
            Console.WriteLine("executado");
            Console.ReadLine();
        }
Esempio n. 4
0
        public ServiceResult<User> InsertUser(User user)
        {
            ServiceResult<User> result = new ServiceResult<User>();

            try {

                var userBusiness = new UserRuler();

                userBusiness.Insert(user);

                result.Completed = true;
            }
            catch (Exception ex) {

                result.Completed = false;
                result.Exception = ex;
            }

            return result;
        }
Esempio n. 5
0
 public User Update(User user)
 {
     return user;
 }
Esempio n. 6
0
 public User Insert(User user)
 {
     return user;
 }
Esempio n. 7
0
 public void Delete(User user)
 {
 }