Exemple #1
0
        public User Update(IdentityContext ctx, User user)
        {
            var result = FindById(ctx, user.Id);

            ctx.Entry(result).CurrentValues.SetValues(user);
            ctx.SaveChanges();
            return(result);
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public async Task <string> UpdateLocationAsync(IdentityContext ctx, User user)
        {
            var result = FindById(ctx, user.Id);

            ctx.Entry(result).CurrentValues.SetValues(user);
            await ctx.SaveChangesAsync();

            return(result.Id);
        }