Example #1
0
        /// <summary>
        /// Inserts a new instance of the entity in the database
        /// </summary>
        /// <param name="instance">Instance to store</param>
        /// <returns>Returns the stored entity</returns>

        public async Task <T> InsertAsync(T instance)
        {
            await _dataContext.AddAsync(instance);

            await _dataContext.SaveChangesAsync();

            return(instance);
        }