public static StackholderCreateViewModel Map(this StackholderInfoModel model) { if (model == null) { return(null); } return(new StackholderCreateViewModel { Date_Of_Registration = model.Date_Of_Registration, Stackholder_ID = model.Stackholder_ID, Email = model.Email, Address = model.Address, Country = model.Country, Sackholder_Name = model.Sackholder_Name, UserId = model.UserId }); }
public async Task Add(StackholderInfoModel stackholderInfoModel) { _context.stackholderInfoModels.Add(stackholderInfoModel); await _context.SaveChangesAsync(); }