Closed vinayaroraincedo closed 5 years ago
Maybe you are searching for this: https://github.com/urfnet/URF.Core/issues/37
Thanks @Crazybutch, now its working. But one thing if I want a id for newly added entity than how can i get those id?
@vinayaroraincedo I'm creating the Id in my Code Id = Guid.NewGuid(); because SaveChanges just returns the count of saved datasets (rows?)
I set the Id on my Dto - AutoMapper to -> Entity and after successful SaveChanges() > 0 I know that my self created Id is valid.
This is an EF issue, unrelated to URF, closing.
I'm trying to store Header and Detail relation data using Insert function for URF.Core.Services.
_notificationService.Insert( new Notifications() { ClientId = command.ClientId, ClientNotificationTemplateId = command.ClientNotificationTemplateId, ConsumerId = command.ConsumerId, NotifiationType = command.NotifiationType, NotificationDetails = new List()
{
new NotificationDetails(){ Body = command.Body, NotifiationType = command.NotifiationType, RecepientAddress = command.RecepientAddress
, Subject = command.Subject, CreatedOn = DateTime.Now, CreatedBy = 123, IsActive = true, IsDeleted = false, TrackingState = TrackingState.Added}
},
Status = command.Status,
CreatedOn = DateTime.Now,
CreatedBy = 602737,
IsActive = true,
IsDeleted = false
Do I have to set some parameters in the service call?