Exemple #1
0
        private static void CreateNewChat(int creatorId, int member)
        {
            LinqToSql lnq = new LinqToSql(ConnString);

            try
            {
                lnq.CreateChat(creatorId, member);
                MenuManager.Menu(new string[] { "Go back" }, "New chat was successfuly created!");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.ReadKey(true);
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            SqlConnection conn = new SqlConnection();

            conn.ConnectionString = ConfigurationManager.ConnectionStrings["connString"].ConnectionString;

            conn.Open();
            SqlCommand command = new SqlCommand();

            command.Connection = conn;

            switch (MenuManager.Menu(new string[] { "SQL management", "LINQ to SQL management", "LINQ to DataSet management", "CodeFirst" }).choice_id)
            {
            case 0:
                Sql.Init();
                break;

            case 1:
                LinqToSql.Init();
                break;

            case 2:
                LinqToDataSet.Init();
                break;

            default:
                new CodeFirst().Init();
                break;
            }



            //Crit();
            //LinqToSql linq = new LinqToSql();
            //linq.Init();
        }