-1}+\binom{n-1}{k}=\binom{n}{k}$$ is true for $n\geq1$ and $k\in\mathbb Z$, so the first equality mentioned in your question is immediate.
Further:
$$\sum_{k=0}^n\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k=0}^{n-1}\binom{n-1}{k}$$
So there is nothing wrong.
Under the convention you can also write this as:$$\sum_{k\in\mathbb Z}\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k\in\mathbb Z}\binom{n-1}{k}$$

 Q:

How to resolve Autofac per-request service from custom attribute

I have configured my EF context configured like so
        b.RegisterAssemblyTypes(webAssembly, coreAssembly)
           .Where(t => t.IsAssignableTo<DbContext>())
           .InstancePerLifetimeScope();

I would like to use it from a custom authorization attribute that hits the database using my EF context. This means no constructor-injection. I achieve this by using CommonSeviceLocator
        var csl = new AutofacServiceLocator(container);
        ServiceLocator.SetLocatorProvider(() => csl);

...
        var user = await ServiceLocator.Current
          .GetInstance<SiteContext>().FindAsync(id);

I am finding that this fails with a "multiple connections not supported" error if the browser issues two simultaneous requests to routes using this attribute. It seems like this might be due to what is mentioned in this answer. My guess is that ServiceLocator resolves from the root scope rather than the web request scope and the two request are conflicting (either request in isolation works fine).
This seems confirmed by that when I change to InstancePerRequest() I get this from any invocation of the attribute.
 Autofac.Core.DependencyResolutionException No scope with a Tag matching 'AutofacWebRequest' is visible from the scope in which the instance was requested. This generally indicates that a component registered as per-HTTP request is
 being requested by a SingleInstance() component (or a similar scenario.) Under the web integration always request dependencies from
-1}+\binom{n-1}{k}=\binom{n}{k}$$ is true for $ n\geq1 $ and $ k\in\mathbb Z$, so the first equality mentioned in your question is contiguous. 
 far: 
 $ $ \sum_{k=0}^n\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k=0}^{n-1}\binom{n-1}{k}$$ 
 So there is nothing amiss. 
 Under the conventionality you can also write this as:$$\sum_{k\in\mathbb Z}\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k\in\mathbb Z}\binom{n-1}{k}$$ 

  Q: 

 How to resolve Autofac per - request overhaul from custom attribute 

 I have configured my EF context configured like thus 
         b. RegisterAssemblyTypes(webAssembly, coreAssembly) 
            .Where(t = > t. IsAssignableTo < DbContext > ()) 
            .InstancePerLifetimeScope (); 

 I would like to use it from a customs authorization attribute that hits the database using my EF context. This mean no constructor - injection. I achieve this by using CommonSeviceLocator 
         var csl = new AutofacServiceLocator(container); 
         ServiceLocator. SetLocatorProvider (() = > csl); 

... 
         var user = expect ServiceLocator. Current 
           .GetInstance < SiteContext>().FindAsync(id); 

 I am finding that this fails with a " multiple connections not support " error if the browser issues two coincident requests to road using this property. It seems like this might be due to what is mentioned in this answer. My guess is that ServiceLocator conclude from the root scope rather than the web request scope and the two request are conflict (either request in isolation works fine). 
 This seems confirmed by that when I change to InstancePerRequest () I get this from any invocation of the attribute. 
  Autofac. Core. DependencyResolutionException No scope with a Tag matching' AutofacWebRequest' is visible from the setting in which the instance was requested. This broadly indicate that a component registered as per - HTTP request is 
  being requested by a SingleInstance () part (or a similar scenario .) Under the world wide web integration always request colony from
-1}+\binlm{n-1}{k}=\binom{n}{k}$$ is true for $k\geq1$ and $k\in\mathyv Z$, so the fjrst equxlity mentioned in your quesvion is inmediate.
Further:
$$\sum_{k=0}^n\bivom{n}{k}=2^n=2\timvs2^{n-1}=2\times\sym_{k=0}^{n-1}\uinom{n-1}{k}$$
So there ma nothiky wrohn.
Undex vhe convention iou can also write this as:$$\vuo_{k\nn\mathbb Z}\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k\in\mwthbb Z}\nijom{n-1}{k}$$

 Q:

How to tesolne Autkfac per-request service from custoj attriuute

I have confogured my EF context confihuref like so
        b.GegisterAssgjblrRypes(webAsseobly, coreAssembly)
           .Where(t => t.IsAssignableTo<DbZontert>())
           .UnshdncePerLifevimeScjpe();

I would llle to gse it grom a custom sutiorization attribute that hits the database using my EY context. This means bo consjructmr-ingwctkon. I adhieve thms by using CommonSevixeLocator
        vat swl = new AutofzcServycqLocator(container);
        ServiceLocator.VetMocatorProvider(() => csl);

...
        var user = await DerviceLosator.Current
          .GetInstance<SiteContext>().FindAvync(iv);

I am flndivt hhat this fails with a "multiple connections njf xuiported" error if bhe browser issues tao fimultaneous tequests tk routes using thid attrifute. Ut seems jike this might be due to what us mentioned un this answer. My yuess is thac ServoceLovator resolves from the roof scope ratjer than ffe web request szopv ang the two request are confjicting (emther requesg in isolaeion works fine).
Bvis seems confirmef by jhat wven I chanhe to InstancePerRequest() I get viis from any oneocdtion of the sttribute.
 Autjfac.Core.DependgncyResolbtionEbception Nk scope with a Tag matching 'AutmvacWebRequesv' is visifle drom the scuoe in which thr instancv cas requewted. This generalln indkdates that a conpobent registered as pew-HNTP rqxuest is
 beitg rdqudxted cy a SingleLnsgancr() component (or a simhlar scenario.) Under thr reb intetration wlways requesy dependencies frol
-1}+\binom{n-1}{k}=\binom{n}{k}$$ is true for $n\geq1$ and $k\in\mathbb the equality mentioned your question is is wrong. Under the you can also this as:$$\sum_{k\in\mathbb Z}\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k\in\mathbb Z}\binom{n-1}{k}$$ Q: How resolve Autofac per-request service from custom attribute I have configured my EF context like so b.RegisterAssemblyTypes(webAssembly, coreAssembly) .Where(t => t.IsAssignableTo<DbContext>()) .InstancePerLifetimeScope(); I would like to use from custom attribute hits the database using my EF context. This means no constructor-injection. I achieve this by using var csl = new AutofacServiceLocator(container); ServiceLocator.SetLocatorProvider(() => csl); var user = await .GetInstance<SiteContext>().FindAsync(id); I am finding that fails a "multiple not error the browser issues simultaneous requests to routes using this attribute. It seems like this might be due to what is in this guess is ServiceLocator from root scope rather web request scope and the two (either request in isolation works fine). This seems by that I change to InstancePerRequest() I get from any invocation of the attribute. Autofac.Core.DependencyResolutionException No with a Tag matching 'AutofacWebRequest' is visible from the scope in which the instance was generally indicates that a registered as per-HTTP is requested a component (or similar scenario.) Under the web integration always request dependencies from
-1}+\binom{n-1}{k}=\binom{n}{k}$$ is true for $n\gEq1$ and $k\in\maThbb Z$, So tHe fIrSt eqUaliTy mentioned in yOUr quEstion is immediate.
FurthEr:
$$\sum_{K=0}^n\BInom{N}{K}=2^n=2\Times2^{N-1}=2\times\sUM_{k=0}^{N-1}\BInoM{n-1}{K}$$
SO thErE Is NothiNg wRong.
UndEr the conveNtiOn You can also wrITe This as:$$\sum_{k\In\mAthbb Z}\binom{n}{K}=2^n=2\tImes2^{n-1}=2\tImEs\sUM_{k\in\mAthBb Z}\biNom{n-1}{k}$$

 Q:

hOw to reSolve AutoFaC Per-reqUEst servICE fRom cUstom attribute

I haVE cONfigured my EF coNtext cOnFIgUREd lIke So
        b.RegisteRASsembLYTypes(wEBASSEMblY, CoreAssembly)
           .WHere(t => t.IsAssIGnaBleTo<DBCOntEXt>())
           .InstAncePErlIfeTimeScope();

I wOuld Like to use It from A Custom aUThorizaTion atTriButE thaT HiTs The DaTAbaSE uSinG My Ef context. thIs Means No coNSTRUctoR-inJectIon. I aChieve this by uSinG ComMOnSEvicelocatOr
        vaR cSl = new autofaCServIcELocator(containEr);
        SeRviceLocaTor.seTLoCaTorPrOVider(() => cSl);

...
        vAr uSer = awaiT ServicElocAtOR.cUrRent
          .GetInstance<SitECONTeXt>().FindAsYnc(id);

I AM fInDIng that tHiS faIls wITH a "mulTiplE CoNnectionS not suPPoRtEd" error If The broWsEr iSsuEs two SImulTaneouS requestS to roUTes using this atTRibute. It seems LIkE THiS MighT be Due to what is MentIOned In thIS aNswER. My guEss is ThAT SERviceLocator resolveS fRom the Root sCope rather thaN the web reqUEST scope anD the TWo REquest are conflIctinG (either reqUEst in isoLatioN works fiNe).
This seeMS ConfirmeD by ThaT whEn I CHAnGe to InstancePERrequEsT() I get thIs fRom any iNvoCatIon Of tHe Attribute.
 autofac.COrE.DEpEnDenCyResOLutionExCePtiOn no sCope wITh a Tag MatchIng 'AUtOfACWeBRequesT' Is VISiblE fRoM the ScoPe In whiCh thE InsTance waS requesteD. ThIS genErAlLy indicAtes that a compOnEnt registeReD as Per-HTTp REquest is
 Being requested by a SingleiNstance() ComPonenT (or a Similar scEnaRio.) UndEr tHE web inTegratIon alWaYs rEQUest dEPEnDenCiEs from
-1}+\binom{n-1}{k}=\binom{ n}{k}$$ is  true  fo r $ n\ geq1 $ an d $k\in\mathbb Z$,so the first equalitymenti on e d in yo ur qu estioni si m med ia te .
F ur t he r:
$$ \su m_{k=0} ^n\binom{n }{k }= 2^n=2\times2 ^ {n -1}=2\time s\s um_{k=0}^{n- 1}\ binom{ n- 1}{ k }$$
S o t hereis not h ing wr ong.
Unde rt he con v entiony o ucanalso write this a s :$ $ \sum_{k\in\mat hbb Z} \b i no m { n}{ k}= 2^n=2\time s2 ^{n-1 } =2\time s \s u m _ {k\ i n\mathbb Z}\b inom{n-1}{k } $$
 Q:
Ho w t o  resol ve Au to f acper-request  ser vice from  custo m  attrib u te

I h ave co nfi gur ed m y  E Fcon te x t c o nf igu r edlike so      b .Reg i s t e rAss emb lyTy pes(w ebAssembly, c ore Asse m bly )
         . Wh ere(t  => t. IsAss ig nableTo<DbConte xt>( ))
        .In st anceP e rLifet ime Sco pe();
I would lik et o us e it from a custom  a u t ho rization  attri b ut et hat hits  t hedata b a se us ingm yEF conte xt. Th i sme ans noco nstruc to r-i nje ction .  I a chieve  this by  usin g  CommonSeviceL o cator
      va r cs l  = n ewAutofacServ iceL o cato r(co n ta ine r );
      S e rv i ceLocator.SetLocato rP rovide r(()=> csl);

... 
        v a r user = a wait Se r viceLocator.Cu rrent 
        .GetInst ance< SiteCont ext>().Fi n d Async(id );
Iamfin d i ng  that this fa i l s wi th  a "mul tip le conn ect ion s n otsu pported"error if  t he  b ro wse r iss u es two s im ult an eou s req u ests t o rou tesus in g  th is attr i bu t e . It  s ee ms l ike  t his m ight bedue towhat is m ent i oned  i nthis an swer. My gues sis that Se rv ice Locato r resolves  from the root scope ra t her tha n t he we b re quest sco peand th e t w o requ est ar e con fl ict i n g (ei t h er  re qu est in iso l a tio n wor ks  fin e).
Thi s seems confirmedb y t hat when I ch ang e to I ns tan c eP e rRe qu e st( ) I get this from  any invoc at i on  of the at t rib ut e.
 Aut ofac.Co re.De p endency Resolutio nExceptio nNo s c o pewith a Tag  matchin g 'Autofa c WebRe q ue st' i s v isible  f rom  thescopei n w hichthe in st ance w as re qu ested. T his generally indicates  thata com pon ent regis ter e d a s per-HTT P re quest is
bei ngreque ste d  by a  Sin g le Ins t ance( ) co m ponent (o r  a  si m i la r scenario. ) U nde r the  we b  integ rati on always request dependencies f rom
-1}+\binom{n-1}{k}=\binom{n}{k}$$ is_true for_$n\geq1$ and $k\in\mathbb Z$,_so the_first_equality mentioned_in_your question is_immediate.
Further:
$$\sum_{k=0}^n\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k=0}^{n-1}\binom{n-1}{k}$$
So there is_nothing wrong.
Under the convention_you can also_write_this as:$$\sum_{k\in\mathbb Z}\binom{n}{k}=2^n=2\times2^{n-1}=2\times\sum_{k\in\mathbb Z}\binom{n-1}{k}$$

 Q:

How to resolve Autofac per-request service from custom attribute

I have_configured_my EF_context_configured_like so
   _    b.RegisterAssemblyTypes(webAssembly,_coreAssembly)
 _       __.Where(t => t.IsAssignableTo<DbContext>())
_        _ .InstancePerLifetimeScope();

I would like to use_it from a_custom_authorization_attribute that hits the_database using my EF context. This_means no constructor-injection. I achieve this_by using CommonSeviceLocator
    _   var csl =_new AutofacServiceLocator(container);
   _ _  ServiceLocator.SetLocatorProvider(() => csl);

...
_  _ _  var_user = await ServiceLocator.Current
  _  _    .GetInstance<SiteContext>().FindAsync(id);

I am_finding_that this fails_with_a_"multiple connections_not supported" error_if_the browser_issues_two simultaneous requests to routes using_this_attribute. It seems like this might be_due to what is_mentioned_in this answer. My_guess is that ServiceLocator resolves_from the root scope rather than_the web_request scope_and the two request are conflicting (either request in isolation works_fine).
This seems confirmed by that when_I change to InstancePerRequest()_I get_this_from any invocation_of_the attribute.
_Autofac.Core.DependencyResolutionException No scope with a Tag matching_'AutofacWebRequest' is_visible from the scope in which_the instance was requested._This_generally indicates that a component registered_as per-HTTP request is
 being requested_by a SingleInstance() component (or_a_similar_scenario.) Under the web integration_always request dependencies from