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;
         }
     }
 }
Example #4
0
 public PostsComplexityRepository(string connectionString, TimeSpan cacheTimespan)
 {
     eCodeWorldContext = new ECodeWorldContext(connectionString, cacheTimespan);
 }
Example #5
0
 public PostsComplexityRepository()
 {
     eCodeWorldContext = new ECodeWorldContext();
 }
Example #6
0
 public UserRepository(string connectionString, TimeSpan cacheTimespan)
 {
     eCodeWorldContext = new ECodeWorldContext(connectionString, cacheTimespan);
 }
Example #7
0
 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();
 }