partial void DeleteUser(User instance);
 partial void InsertUser(User instance);
 partial void UpdateUser(User instance);
Exemple #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;
        }