TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
611
128.2k
Update record in web api.
Mar 6 2020 12:31 AM
I have updated a record in c# web api. I want only first name and last name update but i have check database first name and last name update but other field null .
pls solve isssue.
public UserEditResponse EditAppProfile(UserDetails objParam)
{
UserEditResponse obj = new UserEditResponse();
UserDetails obj_EditUser = new UserDetails();
try
{
var user = _db.FranchiseMasters.Where(x => x.IdFranchise == objParam.UserId).FirstOrDefault();
if (user != null)
{
user.FirstName = objParam.FirstName;
user.LastName = objParam.LastName;
user.PhoneNumber = objParam.PhoneNumber;
user.ProfileImage = objParam.ProfileImage;
user.Email = objParam.Email;
user.Password = objParam.Password;
user.Address = objParam.Address;
user.CreatedDate = DateTime.Now;
//user.IsVerifiedByOtp = objParam.IsVerifiedByOtp;
user.TokenFCM = objParam.TokenFCM;
user.LoginType = objParam.LoginType;
user.LastLogin = objParam.LastLogin;
user.AuthenticationId = objParam.AuthenticationId;
user.DeviceType = objParam.DeviceType;
_db.SaveChanges();
obj.Response = 1;
obj.ErrorMessage = "No Error Found";
it's me code.
Reply
Answers (
7
)
How to remove OR destroy jwt token c#
convert mp4 to byte and play in c#