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
128k
Multiple value store in database.
Jul 2 2020 1:34 AM
How to store input multiple value (Like a user multiple injuries) same time in web api.
public InjuerisResult SavePhysicalInjueris([FromBody]InjerisDetail obj_parameter)
{
InjuerisResult obj_result = new InjuerisResult();
try
{
if (obj_parameter == null)
{
//return BadRequest("Owner object is null");
obj_result.Response = 2;
obj_result.ErrorMessage = " object is null";
}
else
{
TblInjurie ****** = new TblInjurie();
obj_tblInjurie.Date = DateTime.ParseExact(obj_parameter.Date, "d/M/yyyy", CultureInfo.InvariantCulture);
obj_tblInjurie.Description = obj_parameter.Description;
obj_tblInjurie.UserInjuriesTypeId = obj_parameter.UserInjuriesTypeId;
obj_tblInjurie.UserId = obj_parameter.UserId;
obj_tblInjurie.IsActive = true;
_context.Add(obj_tblInjurie);
_context.SaveChanges();
}
its me code save single ijuries data .But iwant to save multiple injuries detail same time.Please provide solution
Reply
Answers (
5
)
Previous problem....
How to char* of C to C# Dllmport