Test Unit
Test Unit
me Thanh.
Iam originally from QB, but now Iam based in Da Nang City for the past 3 years. Iam in the third year of
my FPT university..(Iam work in SF)
I see FPT company as a leading company in technology. If accepted, I would be lucky to work here, with
a very good working environment.
Yes of couse, because pets are very cute, and I can play with them when I feel pressured
I think I like a funny manager, because in a non-toxic working environment, everyone will grow together.
I think I haven't succeeded yet, because I still have many things I haven't achieved in life. I need to try
harder at work.
As I said, I am a goal-oriented person and I have not learned many things in life, so I will try to learn
more knowledge, update and improve it every day, to help the company and myself develop together. .
I am passionate about football, because playing football helps me develop my body, and can also
connect with colleagues in the company, and I am very lucky that the company has a football field so
colleagues can play together.
My biggest weakness is emotions, because I am a person who thinks a lot, so I often have difficulty
regulating my emotions, but I have tried to change it gradually, and now I have improved a lot. .
I have a pen, this pen is a magic pen, it sparkles, and it is very beautiful, you can buy it for 2$ but I will
sell it to you for 1$ because you are very beautiful
// Giao diện repository chung
T GetById(int id);
IEnumerable<T> GetAll();
{
public int Id { get; set; }
// Abstract class chung cho các đối tượng có thể đặc biệt hóa
_context = context;
return _context.Set<Product>().Find(id);
return _context.Set<Product>().ToList();
_context.Set<Product>().Add(entity);
_context.Set<Product>().Update(entity);
if (product != null)
_context.Set<Product>().Remove(product);
_context = context;
return _context.Set<Blog>().Find(id);
}
public IEnumerable<Blog> GetAll()
return _context.Set<Blog>().ToList();
_context.Set<Blog>().Add(entity);
_context.Set<Blog>().Update(entity);
if (blog != null)
_context.Set<Blog>().Remove(blog);
class Program
productRepo.Add(product);
var blog = new Blog { Title = "Example Blog", Content = "Lorem Ipsum" };
blogRepo.Add(blog);
unitOfWork.SaveChanges();