Permalink
Browse files

update and renaming add ReSharper files to the ignor list

  • Loading branch information...
1 parent d21c36d commit c94cd2afb25bfb73cdd6e3bf9b58c88932f55d16 @linuxbender committed Feb 22, 2012
View
@@ -14,4 +14,5 @@
/22-Infrastruture.Test/obj
/22-Infrastruture.Test/bin
/30-CrossCutting.Common/obj
-/30-CrossCutting.Common/bin
+/30-CrossCutting.Common/bin
+/_ReSharper.TimeTweet
View
@@ -8,9 +8,9 @@ public interface IContext
bool ProxyCreationEnabled { set; }
IDbSet<TEntity> SetIDbSet<TEntity>() where TEntity : class, IEntity;
void Commit();
- void isModified<TEntity>(TEntity entity) where TEntity : class, IEntity;
- void isDeleted<TEntity>(TEntity entity) where TEntity : class, IEntity;
- void isAdded<TEntity>(TEntity entity) where TEntity : class, IEntity;
+ void IsModified<TEntity>(TEntity entity) where TEntity : class, IEntity;
+ void IsDeleted<TEntity>(TEntity entity) where TEntity : class, IEntity;
+ void IsAdded<TEntity>(TEntity entity) where TEntity : class, IEntity;
// void DisposeContext();
}
}
@@ -31,17 +31,17 @@ public void Commit()
{
this.SaveChanges();
}
- public void isModified<TEntity>(TEntity entity) where TEntity : class, IEntity
+ public void IsModified<TEntity>(TEntity entity) where TEntity : class, IEntity
{
this.Entry<TEntity>(entity).State = EntityState.Modified;
}
- public void isDeleted<TEntity>(TEntity entity) where TEntity : class, IEntity
+ public void IsDeleted<TEntity>(TEntity entity) where TEntity : class, IEntity
{
this.Entry<TEntity>(entity).State = EntityState.Deleted;
}
- public void isAdded<TEntity>(TEntity entity) where TEntity : class, IEntity
+ public void IsAdded<TEntity>(TEntity entity) where TEntity : class, IEntity
{
this.Entry<TEntity>(entity).State = EntityState.Added;
}
@@ -9,8 +9,8 @@ namespace Ch.TimeTweet.Infrastructure.DataSource
{
public class Repository<TEntity> : IRepository<TEntity> where TEntity : class, IEntity
{
- private IContext _context;
- private IDbSet<TEntity> _objectSet;
+ private readonly IContext _context;
+ private readonly IDbSet<TEntity> _objectSet;
public Repository(IContext context)
{
@@ -77,7 +77,7 @@ public IEnumerable<TEntity> Include<TProperty>(Expression<Func<TEntity, IEnumera
public void Update(TEntity entity)
{
_objectSet.Attach(entity);
- _context.isModified<TEntity>(entity);
+ _context.IsModified<TEntity>(entity);
}
}
}
View
Binary file not shown.

0 comments on commit c94cd2a

Please sign in to comment.