예제 #1
0
 partial void DeleteAddress(Address instance);
예제 #2
0
 partial void InsertAddress(Address instance);
예제 #3
0
 partial void UpdateAddress(Address instance);
예제 #4
0
        /// <summary>
        /// InsertAddressMetaData
        /// </summary>
        /// <param name="ctx"></param>
        /// <returns></returns>
        private static Guid InsertAddressMetaData(DataAccessDataContext ctx, Guid userId)
        {
            //Insert Address
            Guid addressId = Guid.NewGuid();
            Address address = new Address
            {
                Id = addressId,
                HouseNo = "",
                Street = "",
                Locality = "",
                WardId = Guid.NewGuid(),
                PINCODE = 560093,
                Registered = false,
                UserId = userId
            };

            ctx.Addresses.InsertOnSubmit(address);
            ctx.SubmitChanges();
            return addressId;
        }