public Client Create(Client client) { try { _context.Add(client); _context.SaveChanges(); } catch (Exception) { throw; } return(client); }
public Vehicle Create(Vehicle vehicle) { try { _context.Add(vehicle); _context.SaveChanges(); } catch (Exception) { throw; } return(vehicle); }
public User Create(User user) { user.AccessKey = MD5Crypt.Criptografar(user.AccessKey); _context.Add(user); _context.SaveChanges(); return(user); }
public MonsterModel Create(MonsterModel monster) { try{ _context.Add(monster); _context.SaveChanges(); }catch (Exception e) { throw e; } return(monster); }
public ActionModel Create(ActionModel action) { try{ _context.Add(action); _context.SaveChanges(); }catch (Exception e) { throw e; } return(action); }
public Person Create(Person person) { try { _context.Add(person); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(person); }
public T Create(T entity) { try { _mySQLContext.Add(entity); _mySQLContext.SaveChanges(); } catch (Exception) { throw; } return(entity); }
public Aluno Create(Aluno aluno) { try { _context.Add(aluno); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(aluno); }
public Escola Create(Escola escola) { try { _context.Add(escola); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(escola); }
public Turma Create(Turma turma) { try { _context.Add(turma); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(turma); }
public Login Create(Login login) { try { _context.Add(login); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(login); }
public Sinistro Create(Sinistro sinistro) { try { _context.Add(sinistro); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(sinistro); }
public User Create(User user) { try { _context.Add(user); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(user); }
public Book Create(Book book) { try { _context.Add(book); _context.SaveChanges(); } catch (Exception) { throw; } return(book); }
public Livro Create(Livro livro) { try { _context.Add(livro); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(livro); }
public Pessoa Create(Pessoa pessoa) { try { _context.Add(pessoa); _context.SaveChanges(); } catch (Exception) { throw; } return(pessoa); }
// Metodo responsável por criar uma nova pessoa // nesse momento adicionamos o objeto ao contexto // e finalmente salvamos as mudanças no contexto // na base de dados public Movie Create(Movie movie) { try { _context.Add(movie); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(movie); }
public Profile Create(Profile profile) { try { _context.Add(profile); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(profile); }
public Group Create(Group group) { try { _context.Add(group); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(group); }
public Usuario Create(Usuario usuario) { try { _context.Add(usuario); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(usuario); }
public Domain Create(Domain domain) { try { _context.Add(domain); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(domain); }
public Role Create(Role role) { try { _context.Add(role); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(role); }
public Auction Create(Auction auction) { try { _context.Add(auction); _context.SaveChanges(); } catch (Exception) { throw; } return(auction); }
public Comentario Create(Comentario comentario) { try { _context.Add(comentario); _context.SaveChanges(); } catch (Exception ex) { throw ex; } throw new NotImplementedException(); }
public Usuario Create(Usuario usuario) { try { _context.Add(usuario); _context.SaveChanges(); } catch (Exception ex) { throw ex; } throw new NotImplementedException(); }
public Artigo Create(Artigo artigo) { var slug = artigo.permalink; artigo.permalink = GenerateSlug(slug); try { _context.Add(artigo); _context.SaveChanges(); } catch (Exception ex) { throw ex; } return(artigo); }
public UsuarioResponse Create(Usuario user) { UsuarioResponse usuarioResponse = new UsuarioResponse(); try { _context.Add(user); _context.SaveChanges(); usuarioResponse = new UsuarioResponse() { UserName = user.UserName, Nome = user.Nome, DataCriacao = user.DataCriacao, Email = user.Email }; } catch { throw new ServicoException(MensagensUtil.ObterMensagem(HttpStatusCode.BadRequest, "M0004")); } return(usuarioResponse); }
public Person Create(Person person) { _context.Add(person); _context.SaveChanges(); return(person); }
public Device Create(Device device) { _context.Add(device); _context.SaveChanges(); return(device); }
public Book Create(Book book) { _context.Add(book); _context.SaveChanges(); return(book); }