public object Get(int id) { using (var db = new ECodeWorldContext()) { return(db.UserProfiles.Where(x => x.Id == id).FirstOrDefault()); } }
public IEnumerable <UserProfiles> Get() { using (var db = new ECodeWorldContext()) { return(db.UserProfiles.ToList()); } }
public void Put(int id, [FromBody] object userProfile) { using (var db = new ECodeWorldContext()) { var userProfileInDB = db.UserProfiles.Where(x => x.Id == id).FirstOrDefault(); if (userProfileInDB != null) { //userProfileInDB.Description = userProfile.Description; //userProfileInDB.AboutMe = userProfile.AboutMe; } } }
public PostsComplexityRepository(string connectionString, TimeSpan cacheTimespan) { eCodeWorldContext = new ECodeWorldContext(connectionString, cacheTimespan); }
public PostsComplexityRepository() { eCodeWorldContext = new ECodeWorldContext(); }
public UserRepository(string connectionString, TimeSpan cacheTimespan) { eCodeWorldContext = new ECodeWorldContext(connectionString, cacheTimespan); }
public UserRepository() { eCodeWorldContext = new ECodeWorldContext(); }
public PostStatusRepository() { eCodeWorldContext = new ECodeWorldContext(); }
public LoginRepository(string connectionString, TimeSpan cacheTimespan) { this.eCodeWorldContext = new ECodeWorldContext(connectionString, cacheTimespan); }
public LoginRepository() { this.eCodeWorldContext = new ECodeWorldContext(); }
public PostsTypeRepository() { eCodeWorldContext = new ECodeWorldContext(); }
public PostCategoryRepository() { eCodeWorldContext = new ECodeWorldContext(); }