public void Add(Character write) { if (write != null) { _db.Add(write); _db.SaveChanges(); } }
public void Add(Job write) { if (write != null) { _db.Add(write); _db.SaveChanges(); } }
/// <summary> /// Adds an entity of type T to the database. /// </summary> public void Add(T entity) { _semaphore.Wait(); try { _context.Add(entity); _context.SaveChanges(); } finally { _semaphore.Release(); } }
/// <summary> /// Adds an entity of type T to the database. /// </summary> public void Add(T entity) { _context.Add(entity); _context.SaveChanges(); }