Posts

Showing posts from October, 2023

.NET Core 6.0 Entity Framework Core DB First

Image
  Entity Framework Core 6 with Database First in .NET 6 This article will explain how to connect your .NET 6 application to an existing database using Entity Framework Core. Alongside the theory will be given a practical example where we create a new Console Application using .NET 6, this console application then will be connected to a pre-existing sample of the NorthWind DB with Entity Framework Core and the Database First approach. If we compare Database First approach in Entity Framework Core using .NET 6 to previous .NET framework versions we can notice that some important changes were made. Before we had our database based on the .EDMX file, and had to update this .EDMX file every time we had any updates on the database. Now with the scaffold command, we create the same entities as if we created the database using the code first approach. What is Entity Framework Core? Entity Framework Core is Microsoft's most powerful ORM - Object Relational Mapper, that helps ...

Enable Azure AD Authentication Using .Net 5.0 Web API

 https://www.c-sharpcorner.com/article/enable-azure-ad-authentication-using-net-5-0-web-api/

SPO Powershell commands

  $requests = Get-SPOTenantServicePrincipalPermissionRequests $requestToApprove = $requests | ? { $_ .Resource -eq 'Office 365 SharePoint Online' -and $_ .Scope -eq 'MyFiles.Read' } | Select-Object -First 1 if ( $requestToApprove -ne $null ) { Approve-SPOTenantServicePrincipalPermissionRequest -RequestId $requestToApprove .Id } Approve-SPOTenantServicePrincipalPermissionGrant -Resource "Microsoft Graph" -Scope "Mail.Read" Connect-SPOService -Url https:// contoso-admin .sharepoint.com -Credential admin@contoso.com 1. Get Sharepoint Site ID in browser      https://0wjd6.sharepoint.com/_api/site/id 2. Find the ListId You can find the ListId by navigating to the  SharePoint  list, and then copying the URL, and finding the ID. To find the ListId Open  SharePoint , and navigate to the list that contains your workflow. Click  Edit  this list, and then click  List  in the ribbon. Click List Settings. Copy the...

Configure the SharePoint Online App Catalog

Image
  You can create an Sharepoint Online app catalog site collection in few simple steps: Sign into Office 365 as a global admin or SharePoint admin. Select the app launcher icon   in the upper left and choose  Admin  to open the Office 365 admin center (if you don’t see the Admin tile, you don’t have Office 365 administrator permissions in your organization). In the left pane, choose  Admin centers  >  SharePoint .  Click on  ‘More Features’  from the left navigation/pane. Now, click on the  ‘Open’  button under Apps. Select  apps  in the left pane, and then select  App Catalog. Select  Create a new Sharepoint app catalog site , and then select  OK . On the Create App Catalog Site Collection page, enter the required information, and then select  OK . An app catalog site collection has been created.  Once the App Catalog site collection is created successfully, click on the new link to th...

SPO Trail Account

Image
  Azure Free trail account (created date: 10-19-2023)   Azure Admin login Naveen25121989@outlook.com    Dashboard https://developer.microsoft.com/en-us/microsoft-365/profile/ Office 365  Admin email ID naveen25121989@0wjd6.onmicrosoft.com https://0wjd6.sharepoint.com/sites/Compass Sharepoint Online Power Shell  check if sharepoint online was installed  Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version if not installed Install-Module -Name Microsoft.Online.SharePoint.PowerShell To connect with a user name and password Connect-SPOService -Url https://0wjd6-admin.sharepoint.com -Credential admin@contoso.com it will open the popup, click cancel it will redirect to web.

Publish the web API to Azure App Service

In this tutorial you'll learn how to create an ASP.NET Core web API project using Visual Studio, ensure it has OpenAPI support, and then publish the web API to both Azure App Service and Azure API Management. Set up To complete the tutorial you'll need an Azure account. Open a  free Azure account  if you don't have one. Create an ASP.NET Core web API Visual Studio allows you to easily create a new ASP.NET Core web API project from a template. Follow these directions to create a new ASP.NET Core web API project: From the File menu, select  New  >  Project . Enter  Web API  in the search box. Select the  ASP.NET Core Web API  template and select  Next . In the  Configure your new project dialog , name the project  WeatherAPI  and select  Next . In the  Additional information  dialog: Confirm the Framework is  .NET 6.0 (Long-term support) . Confirm the checkbox for  Use controllers (uncheck to use ...