IUserInfoRepository.cs 779 B

1234567891011121314151617181920212223
  1. using XYY.Model.Standard;
  2. using XYY.Core.Standard.Data.Infrastructure;
  3. using Dapper;
  4. namespace XYY.Data.Standard
  5. {
  6. public interface IUserInfoRepository : IBaseRepository<User_Info>
  7. {
  8. void UpdateInfo(User_Info user_Info);
  9. }
  10. public class UserInfoRepository : BaseRepository<User_Info>, IUserInfoRepository
  11. {
  12. public UserInfoRepository(IUnitOfWork unitOfWork)
  13. : base(unitOfWork)
  14. { }
  15. public void UpdateInfo(User_Info user_Info)
  16. {
  17. string sql = "UPDATE[dbo].[User_Info] set [NickName]=@NickName,Company=@Company,Phone=@Phone,WeChat=@WeChat,QQ=@QQ,Email=@Email,OpenId=@OpenId where id =@Id";
  18. _unitOfWork.Connection.Execute(sql, user_Info, _unitOfWork.Transaction);
  19. }
  20. }
  21. }