TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ganesh Jangam
1.5k
257
19.9k
loose coupling of classes over interface
Jun 1 2018 3:13 PM
If i make change in IDatabase interface then it will affect, and at run while creating object of CustomerRepository we still worry about what i have to pass for constructor parameter, Does that mean still there is tight coupling for classes over interface ?
class
CustomerRepository
{
private
readonly IDatabase database;
public
CustomerRepository(IDatabase database)
{
this
.database = database;
}
public
void
Add(string CustomerName)
{
database.AddRow(
"Customer"
, CustomerName);
}
}
interface IDatabase
{
void
AddRow(string Table, string Value);
}
class
Database : IDatabase
{
public
void
AddRow(string Table, string Value)
{
}
}
Reply
Answers (
2
)
Error: ValueFactory attempted to access the Value property
vb.net desktop app using a con.fig file