Example #1
0
        public void DeleteInvocationType(InvocationTypeItem invocationTypeItem)
        {
            var entity = new InvocationType
            {
                InvocationTypeID = invocationTypeItem.InvocationTypeID
            };

            db.InvocationTypes.Attach(entity);
            db.InvocationTypes.Remove(entity);
            db.SaveChanges();
        }
Example #2
0
        public void CreateInvocationType(InvocationTypeItem invocationTypeItem)
        {
            var entity = new InvocationType
            {
                InvocationTypeName = invocationTypeItem.InvocationTypeName
            };

            db.InvocationTypes.Add(entity);
            db.SaveChanges();
            invocationTypeItem.InvocationTypeID = entity.InvocationTypeID;
        }
Example #3
0
        public void UpdateInvocationType(InvocationTypeItem invocationTypeItem)
        {
            var entity = new InvocationType
            {
                InvocationTypeID   = invocationTypeItem.InvocationTypeID,
                InvocationTypeName = invocationTypeItem.InvocationTypeName
            };

            db.InvocationTypes.Attach(entity);
            db.Entry(entity).State = EntityState.Modified;
            db.SaveChanges();
        }