• Asp.netCore

    Asp.net core MVC # Sampurna Full MVC

    Hey guys this is not actually a real official post but in this post i will be working on different scenarios that i felt difficult when playing with asp.net core MVC: 1. Adding Cookies : Note: Here Obj is the variable that i got from database. Note: After that we are going to call that cookies so that empid is called at any time any place : 2.Privately getting database content : 3.This is how i actually created a login Account Controller and called my database to give the specified screen when a user as well as admin logs in : 4. Upload File to the server this is a…

  • Asp.netCore

    Asp.net core Web API join three tables with Guid [Sampurna]#4

    Hey guys this articles that i am writing is an unofficial articles. If you are not executing then i am not resposible. You have to wait until i make a perfect tutorial on My Xamarin Guy Show. @XamarinGuyShowOfficial At first we are going to create a simple web api project. We are going to join three tables with guid’s and create an API. We will be using Employee,Department&Block classes and Employee class will be our master table class from where we are going to handle department and block. Step1: Lets create models Folder. Which contain class: Department,Employee,Block,EmployeeContext,MyWish Department.cs: Block.cs Employee.cs: EmployeeContext.cs: MyWish.cs Step2: Inside Startup.cs Class configure your database Step3:…

  • Asp.netCore

    Asp.net core Web API join two tables [Sampurna]#3

    Create a model folder(Models) Step1: Inside Models folder Create a Department class Department.cs Step2 : Create a Employee.cs class with in folder Step 3: Create a employee context class inside models folder EmployeeContext //This class will be called inside controller i.e employee controller for our post and put method. Step4 : Create another class NewCollector Step5: Inside our Startup.cs class Step6 : Inside our package manager console Add-migration Initial UpdateDatabase Step7: Create a controllers class replace with this : Step8: Run the application Use this For GEt : http://localhost:49465/api/employees Use this for POST : http://localhost:49465/api/employees and select body >> raw >> json (Application/json)>> and add this Use this for put…

  • Asp.netCore

    Asp.net core Perfect learning tutorial [Sampurna] #2

    Hey guys in this tutorial we are going to create a simple asp.net core web api migrating to data base. and making some crud operation. Create a new project > Asp.netcorewebApp>WebApplication4(Anyname) >SelectApi> At first check your project is running or not. Create a new Folder Naming it as Models>create a class(TicketClass) tep2: Create a TicketContextClass inside model Folder Name it as TicketContext.cs //here DbContext inherits from using Microsoft.EntityFrameworkCore; //This TicketItems will take all the contents from the database so of course we need to tell data base to get connection : so lets go to Startup.cs If you don’t know how to access the GetConnectionString then you can store it…

  • Asp.netCore

    Asp .net Core for Xamarin Dev Part 1

    At first Fire up your your Visual Studio for windows or MAC Machine In this tutorial we are going to create our simple API Step 1: Create ASP.net core WEB API in Mac where as in windows Create Asp.netcore Web Application > API Name it as (Solution Name : TripTrackerLive Project Name: TripTracker.BackService) Now let’s Start Create a New Folder Name it as Model (Inside which create a class called Trip) Trip.cs (Here we have added some annotation like key , Required we will be talking about that later ) Repository.cs Step2: Now our fun part begins we are going to call the controller . Create a new Controller called…

  • Asp.netCore

    Asp.netcoreMVC with Xamarin Forms [Core #1]

    This is my first article regarding xamarin forms with Asp.net core mvc so lets start : File > New > Project > Web >  Asp.net core web application >give it name as (Myxamarintest)>WebapplicationMVC> Step2: Add nuget packages : Ooui Ooui.Forms Ooui.ASPNetCore Xamarin.Forms Step3 : create a new Page as MyPage which will look like this :   it’s code behind will look like this : Now we have to configure startup.cs Add this line of code to the given class : Now at last Inside HomeController.cs set your page as starting page : That’s All Output :     183 total views, 1 views today