コード例 #1
0
 private IQueryable <Person> People()
 {
     return(_context.Set <Person>());
 }
コード例 #2
0
        /// <summary>
        /// To add new person to database
        /// </summary>
        /// <param name="entity">People entity</param>
        /// <returns>Rows inserted</returns>
        public async Task Create(People entity)
        {
            await _dbContext.Set <People>().AddAsync(entity);

            await _dbContext.SaveChangesAsync();
        }
コード例 #3
0
 public ICollection <Colour> GetAll()
 {
     return(_context.Set <Colour>().ToList());
 }