Пример #1
0
 partial void DeleteUser(User instance);
Пример #2
0
 partial void InsertUser(User instance);
Пример #3
0
 partial void UpdateUser(User instance);
Пример #4
0
        /// <summary>
        /// InsertUserMetaData
        /// </summary>
        /// <param name="name"></param>
        /// <param name="mobile"></param>
        /// <param name="ctx"></param>
        /// <param name="cityId"></param>
        /// <param name="addressId"></param>
        /// <param name="authId"></param>
        private static Guid InsertUserMetaData(string name, string mobile, DataAccessDataContext ctx, Guid cityId)
        {
            //Insert User Information.
            Guid userId = Guid.NewGuid();
            User user = new User
            {
                Id = userId,
                Name = name,
                Mobile = mobile,
                CityId = cityId,
                Active = true,
            };

            ctx.Users.InsertOnSubmit(user);
            ctx.SubmitChanges();

            return userId;
        }