/// <summary> /// Save the User Information in UserMaster Table. /// </summary> /// <param name="lsUserMaster">List of User Information</param> /// <returns>If information saved Succesfuly then return True else False.</returns> public Boolean SetUserMaster(List <cstUserMasterTbl> lsUserMaster) { Boolean _return = false; try { foreach (var _userinfo in lsUserMaster) { //UserMaster Table Object from the Entity. User _UserMasterTbl = new User(); //add list values to the custom class boject _UserMasterTbl.UserID = Guid.NewGuid(); _UserMasterTbl.UserName = _userinfo.UserName; _UserMasterTbl.UserAddress = _userinfo.UserAddress; _UserMasterTbl.UserPassword = _userinfo.Password; _UserMasterTbl.UserJoiningDate = _userinfo.JoiningDate; _UserMasterTbl.UserFullName = _userinfo.UserFullName; _UserMasterTbl.RoleId = _userinfo.Role; _UserMasterTbl.CreatedBy = GlobalClasses.ClGlobal.UserID; _UserMasterTbl.CreatedDateTime = DateTime.UtcNow; //add Object to the entity. entx3v6.AddToUsers(_UserMasterTbl); } // save the changes to the Entity. entx3v6.SaveChanges(); _return = true; } catch (Exception Ex) { Error_Loger.elAction.save("SetUserInFormationCommand.Execute(0)", Ex.Message.ToString()); } return(_return); }