Dear Team,
I need help in validations in Entity Framework with Swagger.
For Example - If I do not put any values for inputs - Locationcode, drivercode, isactive and isapproved, then it should return all the records. But, here , it takes LocationCode input as "string" and searches the data where locationcode is "string". How do I overcome this ?
--------
For Saving data, I need to make all the inputs compulsory.
Here, how do I make all the inputs compulsory ? and give user-friendly messages that - LocationCode is compulsory?
Please guide on this ..
Riddhi ValechaPosted Apr 7, 2020, 6:56 AM
Viswanatha SwamyPosted Apr 7, 2020, 5:03 AM
Riddhi ValechaPosted Apr 7, 2020, 3:28 AM
Viswanatha SwamyPosted Apr 7, 2020, 2:38 AM
Riddhi ValechaPosted Apr 7, 2020, 1:35 AM
Riddhi ValechaPosted Apr 6, 2020, 2:29 PM
Viswanatha SwamyPosted Apr 2, 2020, 12:57 PM
Viswanatha SwamyPosted Apr 2, 2020, 11:59 AM
Riddhi ValechaPosted Apr 2, 2020, 11:53 AM
dd-MMM-yyyy (E.G. - 02-April-2020)
2. I want to update a record -
.NET Core 2.2 Web API using Entity Framework and MySQL(Backend)
a. Check the values - Mobile_Update != "string" || Mobile_Update != "" then update else do not update Mobile Number
LocationCodeUpdate - this is the primary key.
Riddhi ValechaPosted Apr 2, 2020, 6:51 AM
Riddhi ValechaPosted Apr 2, 2020, 6:16 AM
Jignesh KumarPosted Apr 2, 2020, 5:09 AM
Riddhi ValechaPosted Apr 2, 2020, 4:45 AM
I have 2 more doubts here to ask -
1. How do I display date as dd-MON-yyyy format (E.g. - 02-April-2020).
2. How do I update the records using EntityFramework MySQL?
Please guide on this..
Riddhi ValechaPosted Apr 1, 2020, 11:20 AM
Viswanatha SwamyPosted Apr 1, 2020, 2:18 AM
Riddhi ValechaPosted Apr 1, 2020, 1:18 AM
Viswanatha SwamyPosted Apr 1, 2020, 12:20 AM
Riddhi ValechaPosted Mar 31, 2020, 2:58 PM
Riddhi ValechaPosted Mar 31, 2020, 2:09 PM
Riddhi ValechaPosted Mar 31, 2020, 1:39 PM
Riddhi ValechaPosted Mar 31, 2020, 11:39 AM
Riddhi ValechaPosted Mar 31, 2020, 11:07 AM
Jignesh KumarPosted Mar 31, 2020, 10:37 AM
Riddhi ValechaPosted Mar 31, 2020, 8:23 AM
Jignesh KumarPosted Mar 31, 2020, 8:20 AM
Riddhi ValechaPosted Mar 31, 2020, 6:40 AM
Jignesh KumarPosted Mar 31, 2020, 3:52 AM
Riddhi ValechaPosted Mar 31, 2020, 3:45 AM
Viswanatha SwamyPosted Mar 30, 2020, 11:38 PM
Riddhi ValechaPosted Mar 30, 2020, 12:57 PM
Riddhi ValechaPosted Mar 30, 2020, 12:52 PM
Viswanatha SwamyPosted Mar 30, 2020, 11:59 AM
Riddhi ValechaPosted Mar 30, 2020, 11:51 AM
Riddhi ValechaPosted Mar 30, 2020, 6:18 AM
Riddhi ValechaPosted Mar 27, 2020, 1:33 AM
public class DriverMasterGet
{
public string LocationCode {get;set;}
public string DriverCode {get;set;}
public int IsActive {get;set;}
public int IsApproved {get;set;}
}
public class DriverMasterAdd
{
public string LocationCode {get;set;}
public string DriverName {get;set;}
public string Mobile {get;set;}
public DateTime JoiningDate {get;set;}
public string ShiftFromTime {get;set;}
public string ShiftToTime {get;set;}
public int IsActive {get;set;}
public int IsApproved {get;set;}
}
-------------
DriverMaster.cs
public class DriverMaster
{
public List
{
DriverDBContext DBDriverMaster = new DriverDBContext();
List
if(DriverMasterGet.DriverCode == "0")
{
responseDriverMaster = (from p in DBDriverMaster.DriverMastet join e in DBDrivermaster.Vendormaster on p.vendorocode equals e.vendorcode where p.Locationcode = drivermasterget.locationcode && p.isactive = drivermasterget.isactive
select new DriverMasterRess
{
LocationCode = p.LocationCode,
DriverCode = p.DriverCode
}).ToList();
}
}
}
Siddharth GajbhiyePosted Mar 26, 2020, 11:10 PM
Riddhi ValechaPosted Mar 26, 2020, 1:30 PM
Jignesh KumarPosted Mar 26, 2020, 11:34 AM