Wednesday, 25 August 2021

web api statucode

   public enum HttpStatusCode

    {

        //

        // Summary:

        //     Equivalent to HTTP status 100. System.Net.HttpStatusCode.Continue indicates that

        //     the client can continue with its request.

        Continue = 100,

        //

        // Summary:

        //     Equivalent to HTTP status 101. System.Net.HttpStatusCode.SwitchingProtocols indicates

        //     that the protocol version or protocol is being changed.

        SwitchingProtocols = 101,

        //

        // Summary:

        //     Equivalent to HTTP status 102. System.Net.HttpStatusCode.Processing indicates

        //     that the server has accepted the complete request but hasn't completed it yet.

        Processing = 102,

Tuesday, 24 August 2021

c#

 

What is the conditional operator?

The conditional operator ?:, commonly known as the ternary conditional operator, evaluates a Boolean expression, and returns the result of evaluating one of two expressions, depending on whether the Boolean expression evaluates to true or false.


Here's the basic form:

<evaluate this condition> ? <if condition is true, return this value> : <if condition is false, return this value>

Recap

You should remember the following about the conditional operator:

  • Use the conditional operator when you need to add branching logic inline.
  • Use the conditional operator when you need to return a value based on a binary condition ... return this when true, return that when false.

Thursday, 5 August 2021

git ignore

 to ignore build file

my file inside wwwroot of .net so in git ignore i have given filepath or ryt click on commit changes file show the option git ignore.then i taken that path but fill still getting track so i given after wwwroot/* means all files.

angular dynamic base url binding

 dynamic base url


providers: [
    {
      provide: APP_BASE_HREF,
      useValue: window['base-href']
    }
    ],
  })


<base href="/">
  <script>
    window['base-href'] = window.location.pathname;
    console.log(window['base-href']);
  </script>

Wednesday, 4 August 2021

angular modules

 common header in other module issue is

not working when add selector in other module then select app header for ex  it is in shared module need to access in another module for that follow steps first in shared module in export declare app header  then that module import in another module whre you need to get app-header

1.import module which component you need to access in the module ex:shared

 imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    ReactiveFormsModule,
    AppRoutingModule,
    RouterModule,
    NgbModule,
    SharedModule,
    CarouselModule,
    CommonModule,
    NgSelectModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule { }



here export components which you lik to use has headers.then sharedmodule in module2 imports

  imports: [
    CommonModule,
    RouterModule,
    NgbModule,
    NgSelectModule  
  ],
  exports: [
    LoaderComponent, 
    TapToTopComponent,
    FooterComponent,
    FullLayoutComponent,
    ContentLayoutComponent,
    SearchDatePipe,
    HeaderComponent,
    NavbarComponent
  ],
})
export class SharedModule { }


7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...