Horje
Jeng InitDb Code Example
Jeng InitDb
 public static void InitDb()
        {
            retry:
            try
            {
                //check in first time add default data
                //add fist employee
                if (Kt.Db.Count<Models.Employee>() == 0)
                    Kt.Db.Save(<Model Here>);

            }
            catch (Exception)
            {
                //connection faile show db options
                Kimtoo.DbManager.Connections.Show();
                try
                {
                    var db = Kt.Db;

                }
                catch (Exception err)
                {
                    if (MessageBox.Show(err.Message, "CONNECTON ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning) == DialogResult.Retry)
                        goto retry;
                    Environment.Exit(0);
                }
            }
        }




Csharp

Related
bootstrap daterangepicker change language to french Code Example bootstrap daterangepicker change language to french Code Example
how to get connection string from xml file in c# Code Example how to get connection string from xml file in c# Code Example
syncfusion worksheet get last row with value Code Example syncfusion worksheet get last row with value Code Example
666 Code Example 666 Code Example
MailChimp C# Api calls Code Example MailChimp C# Api calls Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9