Пример #1
0
        public bool Delete(owners obj)
        {
            EDM edm = new EDM();

            edm.Entry(obj).State = System.Data.Entity.EntityState.Deleted;
            try
            {
                edm.SaveChanges();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        public Int32 Create(owners obj)
        {
            EDM edm = new EDM();

            edm.owners.Add(obj);
            try
            {
                edm.SaveChanges();
                return(obj.id);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }