public User Insert(User user) { var factory = FactoryProvider.GetDataFactory(); var repository = factory.CreateUserRepository(); return repository.Insert(user); }
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); }
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(); }
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; }
public User Update(User user) { return user; }
public User Insert(User user) { return user; }
public void Delete(User user) { }