Example #1
0
        public long InsertAddress(Address address)
        {
            context.Addresses.Add(address);
            context.SaveChanges();

            return address.Id;
        }
Example #2
0
        public void UpdateAddress(Address address)
        {
            Address a = context.Addresses.Find(address.Id);

            if (a != null)
            {
                context.Entry(a).State = EntityState.Modified;
                context.SaveChanges();
            }
        }