private AccountDataMapper()
        {
            _accounts = new List <AccountModel>();
            /*Insert Data*/
            var am1 = new AccountModel {
                Username = "******", Email = "*****@*****.**", Password = "******", Confirmed = true
            };

            LoginUtils.EncryptPassword(am1);
            am1.Roles.Add("Admin");
            //----------------------
            var am2 = new AccountModel {
                Username = "******", Email = "*****@*****.**", Password = "******", Confirmed = true
            };

            LoginUtils.EncryptPassword(am2);
            am2.Roles.Add("Admin");
            //----------------------
            var am3 = new AccountModel {
                Username = "******", Email = "*****@*****.**", Password = "******", Confirmed = true
            };

            LoginUtils.EncryptPassword(am3);
            am3.Roles.Add("Admin");
            //----------------------
            var am4 = new AccountModel {
                Username = "******", Email = "*****@*****.**", Password = "******", Confirmed = true
            };

            LoginUtils.EncryptPassword(am4);
            am4.Roles.Add("Admin");
            //----------------------
            var am5 = new AccountModel {
                Username = "******", Email = "*****@*****.**", Password = "******", Confirmed = true
            };

            LoginUtils.EncryptPassword(am5);
            am5.Roles.Add("Admin");
            /*************************/
            var bm = BoardDataMapper.GetBoardDataMapper();

            am1.AddBoard(bm.GetById(1));
            am1.AddBoard(bm.GetById(2));
            _accounts.Add(am1);
            _accounts.Add(am2);
            _accounts.Add(am3);
            _accounts.Add(am4);
            _accounts.Add(am5);
        }
Exemple #2
0
        private ListDataMapper()
        {
            BoardDataMapper bm = BoardDataMapper.GetBoardDataMapper();

            _lists  = new List <ListsModel>();
            _nextId = 1;
            var list = new ListsModel {
                Id = _nextId++, Name = "To Do", Board = bm.GetById(2)
            };

            _lists.Add(list);
            list = new ListsModel {
                Id = _nextId++, Name = "Done", Board = bm.GetById(2)
            };
            _lists.Add(list);
        }
 public static BoardDataMapper GetBoardDataMapper()
 {
     return(_boardDataMapper ?? (_boardDataMapper = new BoardDataMapper()));
 }