public void DeleteInvocationType(InvocationTypeItem invocationTypeItem) { var entity = new InvocationType { InvocationTypeID = invocationTypeItem.InvocationTypeID }; db.InvocationTypes.Attach(entity); db.InvocationTypes.Remove(entity); db.SaveChanges(); }
public void CreateInvocationType(InvocationTypeItem invocationTypeItem) { var entity = new InvocationType { InvocationTypeName = invocationTypeItem.InvocationTypeName }; db.InvocationTypes.Add(entity); db.SaveChanges(); invocationTypeItem.InvocationTypeID = entity.InvocationTypeID; }
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(); }