Beispiel #1
0
        /// <summary>
        /// Executes INSERT operation.
        /// </summary>
        /// <typeparam name="T">Type of the entity.</typeparam>
        /// <param name="queryEndpoint">The query endpoint.</param>
        /// <param name="evaluator">The expression, tha specify new values.</param>
        /// <returns>Key of the created entity.</returns>
        public static Key Insert <T>(this QueryEndpoint queryEndpoint, Expression <Func <T> > evaluator) where T : Entity
        {
            var operation = new InsertOperation <T>(queryEndpoint.Provider, evaluator);

            operation.Execute();
            return(operation.Key);
        }