コード例 #1
0
        public void Rename(int ID, string name)
        {
            Session session = Get(ID);

            session.Name             = name;
            _db.Entry(session).State = System.Data.Entity.EntityState.Modified;
            _db.SaveChanges();
        }
コード例 #2
0
        public Character Edit(DTO.Character character)
        {
            Character domainCharacter = Get(character.ID);

            CharacterConverter.MapDTOToDomain(character, domainCharacter);
            _db.Entry(domainCharacter).State = System.Data.Entity.EntityState.Modified;
            _db.SaveChanges();
            return(domainCharacter);
        }