我目前正在使用EF Code First,SQL CE和Ninject构建我的第一个MVC 3应用程序.我已经阅读了很多关于使用存储库,工作单元和服务层的信息.我想我已经完成了基础知识,并且我已经完成了自己的实现.
这是我目前的设置:
实体
public class Entity
{
    public DateTime CreatedDate { get; set; }
    public Entity()
    {
        CreatedDate = DateTime.Now;
    }
}
public class Profile : Entity
{
    [Key]
    public Guid UserId { get; set; }
    public string ProfileName { get; set; }
    public virtual ICollection<Photo> Photos { get; set; }
    public Profile()
    {
        Photos = new List<Photo>();
    }
public class Photo : Entity
{
    [Key]
    public int Id { get; set; }
    public Guid FileName …