Exemple #1
0
        /// <summary>
        /// Method to add new Section.
        /// </summary>
        /// <param name="Section">The Section entity to add.</param>
        /// <returns>The added Section entity.</returns>
        public async Task <SectionEntity> AddAsync(SectionEntity entity)
        {
            using (Db.Context)
            {
                entity = SectionManager.Add(entity);

                if (entity.IsDefault)
                {
                    await SetDefaultAsync(entity.PrimaryKey);
                }

                return(entity);
            }
        }