Exemplo n.º 1
0
        public linq.Merchant Create(string email, string password)
        {
            if (dc.Merchants.Any(m => m.Email == email))
            throw new Exception("The Email already exists");

             var merchant = new linq.Merchant() {
            Email = email,
            Password = password,
            Inactive = false,
            Confirmed = false
             };
             dc.Merchants.InsertOnSubmit(merchant);
             dc.SubmitChanges();
             return merchant;
        }
 partial void DeleteMerchant(Merchant instance);
 partial void UpdateMerchant(Merchant instance);
 partial void InsertMerchant(Merchant instance);