コード例 #1
0
        public bool InsertMonster(MonsterDAO monster)
        {
            var m = new Monster();

            m.Name     = monster.Name;
            m.GenderId = monster.Gender.Id;

            return(ef.InsertMonster(m));
        }
コード例 #2
0
        public static MonsterDAO MapToMonsterDAO(Monster monster)
        {
            var m = new MonsterDAO();

            m.Id        = monster.MonsterId;
            m.Name      = monster.Name;
            m.Gender.Id = monster.Gender.GenderId;
            m.Type.Id   = monster.MonsterType.MonsterTypeId;

            return(m);
        }
コード例 #3
0
        public bool InsertMonster(GenderDTO gender)
        {
            var gen = msc.GetGenders().FirstOrDefault(g => g.Id == gender.AppId);
            var mon = new MonsterDAO()
            {
                Name = gender.Name, Gender = gen, Type = new MonsterTypeDAO()
                {
                    Id = 1
                }
            };

            return(msc.InsertMonster(mon));
        }
コード例 #4
0
 public static DA.Monster MapToMonster(MonsterDAO monster)
 {
     throw new NotImplementedException();
 }