Operation IOperationServiceInternal.GetOperationById(int operationId)
        {
            List <Operation> operations = new List <Operation>();

            using (IUnitOfWork work = ServiceProvider.GetService <IDataContextFactory>().Get().Create())
            {
                OperationData data = work.For <OperationData>().Query.FirstOrDefault(d => d.Id == operationId);
                if (data == null)
                {
                    return(null);
                }

                return(data.ToOperation());
            }
        }
        Operation IOperationServiceInternal.GetOperationById(int operationId)
        {
            List <Operation> operations = new List <Operation>();

            using (OperationManagementEntities entities = EntityFrameworkHelper.CreateContext <OperationManagementEntities>(EdmxPath))
            {
                OperationData data = entities.Operations.FirstOrDefault(d => d.Id == operationId);
                if (data == null)
                {
                    return(null);
                }

                return(data.ToOperation());
            }
        }