Adding or updating Company entity
You can get rid of the redundancy by using the EntityState. You first try to get the SaveCount. Then based on this value you set the State either to Added or Modified. Something like this should work:

    var companySaveCount = await con.Companies.SingleOrDefault(x =&gt; x.ID == model.ID)?.SaveCount ?? 0;

    var company = new Company
    {
        ...
        SaveCount = saveCount + 1
    };

    var companyExists = companySaveCount &gt; 0;
    con.Entry(company).State = 
        companyExists
            ? EntityState.Modified;
            : EntityState.Added;    
    }   

    await con.SaveChangesAsync(); 


Alternatively the first query could be just:

var companySaveCount = await con.Companies.Where(x =&gt; x.ID == model.ID).Select(x =&gt; x.ID).SingleOrDefult();


so that you don't have to get the entire object.