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

            return repository.Insert(user);
        }
Ejemplo 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);
        }
Ejemplo 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();
        }
Ejemplo 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;
        }
Ejemplo n.º 5
0
 public User Update(User user)
 {
     return user;
 }
Ejemplo n.º 6
0
 public User Insert(User user)
 {
     return user;
 }
Ejemplo n.º 7
0
 public void Delete(User user)
 {
 }