public static void AddAccountByUserId(Guid userId, string Business_name, Guid Company_id, string EmailId)
 {
     Domain.Myfashion.Domain.Account account = new Domain.Myfashion.Domain.Account();
     account.User_id       = userId;
     account.Company_id    = Company_id;
     account.EmailId       = EmailId;
     account.Business_name = Business_name;
     AccountRepository.Add(account);
 }
        public static void AddAccountByUserId(Guid userId, string Business_name, Guid Company_id, string EmailId)
        {
            Domain.Myfashion.Domain.Account account = new Domain.Myfashion.Domain.Account();
            account.User_id = userId;
            account.Company_id = Company_id;
            account.EmailId = EmailId;
            account.Business_name = Business_name;
            AccountRepository.Add(account);

        }
 public static  void Add(Account account)
 {
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             session.Save(account);
             transaction.Commit();
           
         }
     }
 }
        public string updateAccount(string Accid, Account account)
        {
            try
            {
                int i = 0;
                //     Account account = new Account();
                using (NHibernate.ISession session = SessionFactory.GetNewSession())
                {
                    using (NHibernate.ITransaction transaction = session.BeginTransaction())
                    {
                        try
                        {
                            i = session.CreateQuery("Update Account set Business_name=:Business_name,Company_url=:Company_url,Tags=:Tags,Indusrties=:Indusrties,Default_no=:Default_no,Country_name=:Country_name,City=:City,Zip=:Zip  where Company_id = :Company_id")
                                    .SetParameter("Business_name", account.Business_name)

                                    .SetParameter("Company_url", account.Company_url)
                                    .SetParameter("Tags", account.Tags)
                                    .SetParameter("Indusrties", account.Indusrties)
                                    .SetParameter("Default_no", account.Default_no)
                                    .SetParameter("Country_name", account.Country_name)
                                    .SetParameter("City", account.City)
                                    .SetParameter("Zip", account.Zip)
                                    .SetParameter("Company_id", Accid)
                                    .ExecuteUpdate();
                            transaction.Commit();

                            return "updated";

                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine(ex.StackTrace);
                            return null;
                        }

                    }

                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return null;
            }
        }