Skip to main content

Posts

Code First Approach in ASP.NET CORE MVC

 How to implement Code First Approach in ASP.NET CORE MVC:- Code First Approach is best for light-weight and smaller project in ASP.NET MVC Core, it is basically created to those developer who is not know about SQL. without SQL Server or any database package developer can create complete project. Step 1 New Project Once you have installed the Visual Studio 2019 and .Net Core 3.1 SDK, you can start building a new ASP.NET Core Application. Step 2nd:- Create a web app and From the Visual Studio select Create a new project. Select ASP.NET Core Web Application > Next. Step 3rd:- Give your project a name i.e. SampleCodeFirstExample and give your project a location where it’ll be saved and click Create. Step4th:-  Install the NuGet Packages From the Solution right click on dependency, select Manage NuGet Packages and Select the Browse tab, and then enter Microsoft.EntityFrameworkCore.SqlServer in the search box, select Latest Stable Version and Install. Step5h:- Now, install ...

Salesforce Crud Operation in separate Update and Delete page using Apex class

Salesforce Crud Operation in New Page  Create Apex class First:- public class StuEditOperation { public List<stu__c> allRec{get;set;} public stu__c coll;            // Property to store the parameter value passed from the Visualforce page     public String paramValue { get; set; }     public string value { get; set;}  public StuEditOperation()     {         allRec = [select Id,Name,fees__c from stu__c];              //   System.debug('Value is in constructor '+paramValue);            }      public void testdirect(){         system.debug(value);     }     public PageReference editstu() {          system.debug('inside method');         paramValue=ApexPages.currentPage().getParameters().get('paramValue');    ...

What is Salesforce? What is Apps and Object?

What is Salesforce? What is Apps and Object?   It is dynamic CRM that is used to create complete web software to manage the any organization internal activity based on sales, service, marketing, community, etc., it also provide customized solution, data integrity and custom app development using multiple salesforce org. Salesforce is a cloud based platform that provide SFDC based product to create and customized complete application under force.com cloud server. It is based on SAAS and PAAS based cloud services.  SAAS means Software as a service and PAAS means Process as a Service. How to create Account on SFDC 1)  developer.salesforce.com/signup create account using this  2)  login.salesforce.com using this write proper userid and password to manage the account login process .................................................................................................... What is App in salesforce:- App means application, salesforce provide two different type...

Salesforce APEX VISUAL FORCE CRUD OPERATION

Salesforce APEX VISUAL FORCE CRUD OPERATION:- public class StuEditOperation { public List<stu__c> allRec{get;set;} public stu__c coll;  public StuEditOperation()     {         allRec = [select Id,Name,fees__c from stu__c];            }     public PageReference editstu() {         //string idParam = apexpages.currentpage().getparameters().get('id');         coll = [SELECT Id, Name, fees__c FROM stu__c WHERE Id = 'a0F5i00000KbR4j'];         PageReference pageRef = Page.stufindoperation;         pageRef.getParameters().put('sid',coll.ID);         pageRef.getParameters().put('sname',coll.Name);         pageRef.getParameters().put('fees',String.valueOf(coll.fees__c));         return PageRef;         //return Page.stufindoperation;     } } Visual...

Salesforce CRUD Operation using GRID pattern

 Salesforce CRUD Operation using GRID pattern Code of Visualforce page:- <apex:page controller="StuCrudOperation"> <script   src="https://code.jquery.com/jquery-3.7.1.js"   integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="   crossorigin="anonymous"></script>   <apex:form >   <apex:pageBlock >  <apex:inputText id="paramText"/>  <apex:commandButton value="click" oncomplete="findData()" />  </apex:pageBlock>       <apex:pageBlock id="anyName">         <apex:pageblocktable value="{!allRec}" var="a">                       <apex:column value="{!a.id}" id="stuid"/>                <apex:column value="{!a.Name}" id="stuname" />                <apex:column value="{!a.fees__c}" id="stufees"/> ...

Salesforce CRUD Operation using Apex class and Visualforce

Salesforce CRUD Operation using APEX Class and VisualForce by Shiva Sir Student Object Insert Code:-  CODE 1st:- <apex:page controller="StuInsert" >     <apex:form >     <apex:pageBlock title="Collage Details">        <apex:pageBlockSection columns="2">                 <apex:inputField value="{!coll.Name}"/>                  <apex:inputField value="{!coll.fees__c}"/>                 <apex:commandButton value="Save Collage" action="{!save}"/>                   </apex:pageBlockSection>              </apex:pageBlock>     </apex:form> </apex:page> APEX CODE for Data Insertion:- public class StuInsert {     public stu__c coll {get;set;}     public...

How to perform CRUD Operation in .NET CORE using Database First Approach:- BY Shiva Sir

 How to perform CRUD Operation in .NET CORE using Database First Approach:-  BY Shiva Sir:- Database First means you should create database and table from Database end and Program Code and Business Logic from application end. Database first most useful approach in Entity framework for large projects. 1)  Create Database  2)  Create Table 3)  Create .NET MVC Project 4)  MICROSOFT.ENTITYFRAMEWORKCORE.SqlServer MICROSOFT.ENTITYFRAMEWORKCORE.TOOLS MICROSOFT.ENTITYFRAMEWORK.CORE 5)  WRITE THIS COMMAND to GENERATE CONTEXT CLASS AND MODEL CLASS. Scaffold-DbContext "Data Source=(localdb)\ProjectsV13;Initial Catalog=Northwind; Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;"  -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models/DB 6)  go into appsetting.json file and create connection String {   "Logging": {     "LogLevel": {       "Default": "Information", ...