private EfEntityState MapToEf(EntityState state)
        {
            var efEntityState = (EfEntityState)Enum.Parse(typeof(EfEntityState), state.ToString());

            return(efEntityState);
        }
 public void SetEntityState <TEntity>(TEntity entity, EntityState state) where TEntity : class, IEntity
 {
     Entry(entity).State = MapToEf(state);
 }