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

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

            db.InvocationTypes.Add(entity);
            db.SaveChanges();
            invocationTypeItem.InvocationTypeID = entity.InvocationTypeID;
        }
Esempio n. 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();
        }