public bool InsertMonster(MonsterDAO monster) { var m = new Monster(); m.Name = monster.Name; m.GenderId = monster.Gender.Id; return(ef.InsertMonster(m)); }
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); }
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)); }
public static DA.Monster MapToMonster(MonsterDAO monster) { throw new NotImplementedException(); }