static void Main(string[] args) { var container = new UnityContainer(); DependencyResolver.Resolve(container); var service = container.Resolve <IUserService>(); try { service.Register("Juliano", "*****@*****.**", "123Mudar", "123Mudar"); SpaUserControlDataContext context = new SpaUserControlDataContext(); var user = context.users.Where(u => u.Email == "*****@*****.**").FirstOrDefault(); Console.WriteLine(user.Email); Console.ReadKey(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadKey(); } }
public UserRepository(SpaUserControlDataContext context) { this._context = context; }