예제 #1
0
        public User Insert(User user)
        {
            var factory = FactoryProvider.GetDataFactory();
            var repository = factory.CreateUserRepository();

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