Ejemplo n.º 1
0
        /// <summary>
        /// Update Field entity
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="includeProperties"></param>
        /// <returns></returns>
        public virtual bool UpdateFieldsSave(T entity, params Expression <Func <T, object> >[] includeProperties)
        {
            var dbEntry = Context.Entry(entity);

            foreach (var includeProperty in includeProperties)
            {
                dbEntry.Property(includeProperty).IsModified = true;
            }
            Context.SaveChanges();
            return(true);
        }