private void CreateMovies() { if (_movies == null) { _movies = new FakeDbSet<Movie>(); _movies.Add(new Movie { ID = 1, Title = "Test Album 1", Genre="Genre 1", Price=8.99M, Rating="R", ReleaseDate=new DateTime(1985, 6, 1)}); _movies.Add(new Movie { ID = 2, Title = "Test Album 2", Genre = "Genre 2", Price = 8.99M, Rating = "R", ReleaseDate = new DateTime(1985, 6, 1) }); _movies.Add(new Movie { ID = 3, Title = "Test Album 1", Genre = "Genre 3", Price = 8.99M, Rating = "R", ReleaseDate = new DateTime(1999, 6, 1) }); } }
private static void Add2TodoListsAnd3TodoItems(IDbSet<TodoList> todoLists, IDbSet<TodoItem> todoItems) { foreach (var list in TodoLists) { todoLists.Add(list); } foreach (var item in TodoItems) { todoItems.Add(item); } }
public override void Add(T entity) { _dbset.Add(entity); SaveChanges(); }
public Tid Add(Tentity entity) { var item = _dbset.Add(entity); return(item.Id); }
public virtual void Add(T entity) { dbset.Add(entity); }
public virtual void Add(TEntity obj) { _dbset.Add(obj); }
public void AddUserMetaDataByUserName(UserMetaData userMetaData, string userName) { userMetaData.User = _userService.GetUserByUserName(userName); _userMetaData.Add(userMetaData); }
public void InsertModel(T model) { dbEntity.Add(model); }
public void Create(T obj) { dbSet.Add(obj); db.SaveChanges(); }
public virtual void Add(TEntity entity) { dbSet.Add(entity); }
public TEntity Insert(TEntity entity) { _dbSet.Add(entity); _context.SaveChanges(); return(entity); }
public void Add(T Entity) { _dbSet.Add(Entity); _dbContext.SaveChanges(); }
public void Insert(T obj) { table.Add(obj); }
public T Insert(T entity) { return(dbSet.Add(entity)); }
public virtual T Add(T entity) { dbset.Add(entity); return(entity); }
public virtual T Add(T entity) { return(_dbset.Add(entity)); }
public virtual T Add(T entity) { return(dbSet.Add(entity)); }
/// <summary> /// Add an entry /// </summary> public virtual void Add(TDomainClass instance) { DbSet.Add(instance); }
public void Add(T entity) { _dbSet.Add(entity); }
public void AddNewProduct(Product product) { _products.Add(product); }