public async Task <UsersExtension> SaveProfileImagePath(string username, string path, string thumbPath) { UsersExtension user = UsersExtensions.Where(p => p.Users.UserName == username).FirstOrDefault(); user.ImagePath = path; user.ImageThumbPath = thumbPath; _context.SaveChanges(); return(user); }
public async Task <HttpResponseMessage> GetProfileById(string Id) { UsersExtension user = await _usersRepo.GetUsersExtensionByIdentityIdAsync(Id); Mapper.CreateMap <UsersExtension, ProfileViewModel>(); ProfileViewModel profileVm = Mapper.Map <UsersExtension, ProfileViewModel>(user); return(Request.CreateResponse(HttpStatusCode.OK, profileVm)); }
public async Task <UsersExtension> GetUsersExtensionByIdentityIdAsync(string id) { UsersExtension user = UsersExtensions.Where(p => p.Users.UserName == id).FirstOrDefault(); return(user); }