private List<long> GetAllCifFromTables(Asconteparhii entity)
        {
            var collectionFromCifFields = new List<long>();

            if (entity != null)
            {
                if (entity.Previziuni != null)
                {
                    if (entity.Previziuni.P != null && entity.Previziuni.P.Any())
                    {
                        foreach (var previziuni in entity.Previziuni.P)
                        {
                            collectionFromCifFields.Add(previziuni.Cif);
                        }
                    }
                }

                if (entity.Solduri != null)
                {
                    if (entity.Solduri.S != null && entity.Solduri.S.Any())
                    {
                        foreach (var solduri in entity.Solduri.S)
                        {
                            collectionFromCifFields.Add(solduri.Cif);
                        }
                    }
                }

                if (entity.BunuriCulturale != null)
                {
                    if (entity.BunuriCulturale.B != null && entity.BunuriCulturale.B.Any())
                    {
                        foreach (var bunuriCulturale in entity.BunuriCulturale.B)
                        {
                            collectionFromCifFields.Add(bunuriCulturale.Cif);
                        }
                    }
                }

                if (entity.Eb != null)
                {
                    if (entity.Eb.E != null && entity.Eb.E.Any())
                    {
                        foreach (var eb in entity.Eb.E)
                        {
                            collectionFromCifFields.Add(eb.Cif);
                        }
                    }
                }

                if (entity.Mfix != null)
                {
                    if (entity.Mfix.M != null && entity.Mfix.M.Any())
                    {
                        foreach (var mfix in entity.Mfix.M)
                        {
                            collectionFromCifFields.Add(mfix.Cif);
                        }
                    }
                }
            }

            return collectionFromCifFields;
        }
        private void CheckIfAllRecordsAreSuccessfullySaved(Asconteparhii entity, out bool isCreatedPreviziuni, out bool isCreatedSolduri,
            out bool isCreatedEb, out bool isCreatedMfix, out bool isCreatedBunuriCulturale)
        {
            if (entity.Previziuni != null)
            {
                isCreatedPreviziuni = entity.Previziuni.P == null || this.CreatePreviziuni(entity.Previziuni.P);
            }
            else
            {
                isCreatedPreviziuni = true;
            }

            if (entity.Solduri != null)
            {
                isCreatedSolduri = entity.Solduri.S == null || this.CreateSolduri(entity.Solduri.S);
            }
            else
            {
                isCreatedSolduri = true;
            }

            if (entity.Eb != null)
            {
                isCreatedEb = entity.Eb.E == null || this.CreateEb(entity.Eb.E);
            }
            else
            {
                isCreatedEb = true;
            }

            if (entity.Mfix != null)
            {
                isCreatedMfix = entity.Mfix.M == null || this.CreateMfix(entity.Mfix.M);
            }
            else
            {
                isCreatedMfix = true;
            }

            if (entity.BunuriCulturale != null)
            {
                isCreatedBunuriCulturale = entity.BunuriCulturale.B == null ||
                                           this.CreateBunuriCulturale(entity.BunuriCulturale.B);
            }
            else
            {
                isCreatedBunuriCulturale = true;
            }
        }