Beispiel #1
0
        public AutorEntity CriarAutor(string nome)
        {
            var novoAutor = new AutorEntity {
                Nome = nome
            };

            _databaseContext.Autores.Add(novoAutor);
            _databaseContext.SaveChanges();

            return(novoAutor);
        }
Beispiel #2
0
        public AutorEntity Create(string nome)
        {
            var autor = new AutorEntity {
                Nome = nome
            };

            this.databaseContext.Autores.Add(autor);
            this.databaseContext.SaveChanges();

            return(autor);
        }