Beispiel #1
0
        public static ChartOfAccount GetFirst()
        {
            var            realm = Realm.GetInstance();
            ChartOfAccount coa   = realm.All <ChartOfAccount>().FirstOrDefault();

            return(coa);
        }
Beispiel #2
0
        public static void Seed()
        {
            ChartOfAccount coa = new ChartOfAccount
            {
                AccountNumber = "100100",
                AccountName   = "Checking",
                Grouping      = 1
            };

            var realm = Realm.GetInstance();

            realm.Write(() =>
            {
                realm.Add(coa);
            });
        }