Splits up two comma separated items, if they exist This method splits up two comma separated items, if they exist, and increments the amount if the are already in the list; otherwise add the item to the list

I want to know if this code can be optimized some more. Any suggestions?

The method below works 100% fine but I feel like it is not neatly done.

private void SeperateJoinedDisposables(IEnumerable&lt;Models.Container&gt; joinedDisposables)
{
    if (!joinedDisposables.Any())
        return;

    foreach (var item in joinedDisposables.ToList())
    {
        var amount = item.Amount;
        var container = item.Container;

        var disposable1 = container.Substring(0, container.IndexOf(","));
        var disposable2 = container.Substring(container.IndexOf(",") + 1);

        DisposablesModel.Containers.Remove(item);

        var disposableCointians1 = DisposablesModel.Containers.FirstOrDefault(x =&gt; x.Container.ToUpper().Contains(disposable1.ToUpper()));
        var disposableCointians2 = DisposablesModel.Containers.FirstOrDefault(x =&gt; x.Container.ToUpper().Contains(disposable2.ToUpper()));

        if (disposableCointians1 != null)
            disposableCointians1.Amount = (int.Parse(disposableCointians1.Amount) + int.Parse(amount)).ToString();
        else
            DisposablesModel.Containers.Add(new Models.Container { Amount = amount, Container = disposable1 });

        if (disposableCointians2 != null)
            disposableCointians2.Amount = (int.Parse(disposableCointians2.Amount) + int.Parse(amount)).ToString();
        else
            DisposablesModel.Containers.Add(new Models.Container { Amount = amount, Container = disposable2 });
    }
}


Here is my model class

    public class DisposablesModel
    {
        public string Barcode { get; set; }
        public string RushColor { get; set; }
        public string RushDescription { get; set; }
        public string Pollution { get; set; }
        public int NumberOfSamples { get; set; }
        public List&lt;Container&gt; Containers { get; set; }
        public bool IsSubcontracted { get; set; }
    }

    public class Container
    {
        public string Amount { get; set; }
        public string Container { get; set; }
    }
Some quick remarks:


The class "Container" has a property named "Container"? That is... confusing, to say the least. Hence you having to name it item when iterating through it, which is unclear (and thus bad). 
"Cointians" has two typos.
If you need to have a case insensitive Contains(), there are better ways to do it than use ToUpper(): https://stackoverflow.com/a/54686459/648075
Do not copy-paste logic when it is the same for two cases; instead move it to a method and call it.
Why is the property Amount a string instead of an int? Your code constantly needs to converts strings to ints and vice versa; why not use the proper types instead and avoid all that?
Is the Container of a Container always a comma-separated string of two items? Why then not make it a List&lt;string&gt; Names?




Most impotantly: due to the bad names, I have trouble figuring out what your code actually does. 

That joinedDisposables is a list of Containers is unclear, and due to "Container" being both the name of a class as well as one of its properties the code becomes even more unclear. 

I have the impression that once your Container class has a "proper" structure, much of this code can be replaced by simple LINQ queries; it's just that the bad names and the bad structures obfuscate so much it makes things hard to grasp.

To me it looks like public List&lt;Container&gt; Containers { get; set; } should be a Dictionary&lt;string, int&gt;, and that what you pass to SeperateJoinedDisposables should be a List&lt;string&gt; where each string is a comma separated list. And then your code would be something like this:

Dictionary&lt;string, int&gt; Containers = new Dictionary&lt;string, int&gt;();

private void Parse(List&lt;string&gt; commaSeparatedValues)
{
    foreach (var commaSeparatedValue in commaSeparatedValues)
    {
        foreach (var value in commaSeparatedValue.Split(','))
        {
            var normalisedValue = value.ToLower();

            if (!Containers.TryGetValue(normalisedValue, out int count))
            {
                count = 0;
            }

            count++;
            Containers[normalisedValue] = count;
        }
    }
}


To me this code expresses far more clearly the intent of what you're trying to do -- if I correctly understand the purpose of your code, of course. 

But then I don't know where IEnumerable&lt;Models.Container&gt; joinedDisposables comes from and how it is constructed and why it is constructed that way, so I can only assume a "better" solution based on limited knowledge.